[jboss-user] [JBoss Seam] - Re: (Solved by extending EntityHome?) Object cached when pag
fabio.ita04
do-not-reply at jboss.com
Thu Jan 25 08:14:28 EST 2007
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
More information about the jboss-user
mailing list