Hello we have migrated from Seam 1.2.1 to Seam 2.0 and there is an annoing behavior of
DataModel - if the DatgaModel is on a long running conversation and holds a list of
database entities, the values of the entities are null after the first display of the
page.
To be more concrete:
The bean (assume we are inside an already started long running conversation ):
| @Scope(ScopeType.CONVERSATION)
| @Name("requestWizard_attachments")
| public class AttachmentsAction {
| ...
| @In
| private EntityManager entityManager;
|
| @DataModel
| private List<CoreBuyer> buyerList;
|
| @Factory("buyerList")
| public void refreshBuyerList() {
| buyerList = new ArrayList<CoreBuyer>();
| buyerList.add(entityManager.find(CoreBuyer.class, 1));
| }
| ...
| }
|
The xhtml:
| ...
| <h:dataTable var="item" value="#{buyerList}" >
| <h:column >
| <f:facet name="header">
| <h:outputText value="buyer" />
| </f:facet>
| #{item.buyerId},#{item.name}
| </h:column>
| </h:dataTable>
| ...
|
The scenario is like this:
- After conversation started we go to attachments page
- the list of buyers (actually has 1 item in the simplified example above) displays
correctly
- we navigate to another page, but we are still in the conversation
- we click again on attachments link in order to navigate to the page again
- the list of buyers still has one item, but all values of the item are null!!
What happens?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102980#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...