On a results screen I use the s:link tag in a table. The results screen is generated from
a SFSB with ScopeType.EVENT. When the user clicks on the <s:link /> action, a new
screen opens up from another SFSB with ScopeType.CONVERSATION.
This works great until JBoss is restarted. Once restarted, the view action (below) on an
existing results screen returns the results.xhtml screen without any records and does not
seem to call the SFSB editor.view that I expected.
Should this work? Or I'm trying to do something not allowed?
Link in results.xhtml
| <h:dataTable value="#{fulfillments}" var="fulfillment">
| <h:column>
| <f:facet name="header">Action</f:facet>
| <s:link value="View" action="#{editor.view}"
propagation="none">
| <f:param name="id"
value="#{fulfillment.orderID}"/>
| </s:link>
| </h:column>
| </h:datatable>
|
Finder.java
| @Name("finder")
| @Stateful
| @Scope(ScopeType.EVENT)
| @LoggedIn
| public class Finder implements IFinder {
|
| @DataModel
| private List<Fulfillment> fulfillments;
|
| @DataModelSelection
| private Fulfillment selected;
|
| private Fulfillment fulfillment = new Fulfillment();
|
| @Begin(flushMode=FlushModeType.MANUAL)
| public String find(){
| fulfillments = DAFulfillment.find(fulfillment);
| return "found";
| }
|
| @Destroy
| @Remove
| public void destroy(){
| }
|
| public Fulfillment getFulfillment(){
| return fulfillment;
| }
|
| public void setFulfillment(Fulfillment fulfillment){
| this.fulfillment = fulfillment;
| }
| }
|
Editor.java
| @Name("editor")
| @Stateful
| @LoggedIn
| public class Editor extends AbstractEditor implements IEditor{
|
| public Fulfillment fulfill;
|
| @RequestParameter
| protected Long id;
|
| @DataModel
| private List<Item> items;
|
| @DataModelSelection
| private Item item;
|
| @Create
| @Begin
| public void initialize(){
| fulfill = load(Fulfillment.class, id); //does loading in a superclass
| items = new ArrayList<Item>();
| items.addAll(fulfill.getItems());
| }
|
| public String save(){
| persist(fulfill);
| return super.save(); //super method returns "saved";
| }
|
| @End
| public String cancel(){
| em.refresh(fulfill);
| return "cancel";
| }
|
| @End
| public String return(){
| em.refresh(fulfill);
| return "return";
| }
|
| @Destroy
| @Remove
| public void destroy(){
| }
|
| public Fulfillment getFulfill(){
| return fulfill;
| }
|
| public void setFulfill(Fulfillment fulfill){
| this.fulfill = fulfill;
| }
| }
|
Thanks,
Chris....
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961068#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...