viernes, 6 de julio de 2007

mantener varias conversaciones siguiendo el ejemplo de seam-issues

¿quién inicia las conversaciones en este proyecto?
pues es un bean stateless

@Stateless
@Name("projectSelector")
public class ProjectSelectorBean implements ProjectSelector {

@In
private transient Map messages;

@Logger
private Log log;


@In(create=true)
private transient ProjectEditor projectEditor;

@In()
Conversation conversation;

@In(create=true)
private transient ProjectFinder projectFinder;

@Begin()
public String select() {
projectEditor.setInstance( projectFinder.getSelection() );
return "editProject";
}

public String getButtonLabel() {
return messages.get("View");
}

public boolean isCreateEnabled() {
return true;
}

}

@Name("projectEditor")
@Stateful
public class ProjectEditorBean implements ProjectEditor {
...
}

No hay comentarios: