[jboss-user] [JBoss Seam] - DataModel bug in Seam 2

andreigh.ts do-not-reply at jboss.com
Thu Nov 8 11:16:08 EST 2007


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#4102980

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102980



More information about the jboss-user mailing list