This content has been marked as final.
Show 2 replies
-
1. Re: (Solved by extending EntityHome?) Object cached when pag
fabio.ita04 Jan 25, 2007 8:14 AM (in response to fabio.ita04)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. -
2. Re: Object cached when page parameter not specified
gavin.king Jan 25, 2007 1:54 PM (in response to fabio.ita04)I made a similar fix in CVS - please try it out, thanks.