When debugging the error, I noticed that even if EntityHome id was changed (via 
page params), EntityHome was always getting the last entity returned by 
getInstance. So, I extended EntityHome and called clearDirty inside getInstance 
method. The problem looks like to be solved. Is it reazonable?


  | @Override
  | @Transactional
  | public T getInstance() {
  |      if (instance==null || clearDirty())
  |           initInstance();
  |      return instance;
  | }
  | 

Maybe another way to solve the problem is using explicit conversation id 
(section 6.6 in Seam 1.1.0 reference). This way I can be sure the desired 
conversation (and thus the desired state) is loaded. But in some cases (when 
using EntityHome components, so I can't use annotations) I have to declare it 
via pages.xml:


  | <page view-id="/edit.xhtml">
  |     <param name="id" value="#{userManager.id}" />
  |     <begin-conversation nested="true" id="somealias#{id}" />
  | </page>
  | 

Is it possible?

Thanx,
Fábio.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006333#4006333

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

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to