[jboss-user] [JBoss Seam] - setting a DataModel to null from another session bean
do-not-reply at jboss.com
Tue May 29 10:30:57 EDT 2007
I am using Seam 1.0.0 GA.
I am facing a situation where I want to set DataModel to null from the bean in which it is not defined.
I have defined a DataModel in session bean 1 and populating it in a Factory method.
On some event in my application, the page is getting rendered which uses this DataModel to display the list.
When this event happens, control goes to some other session bean 2 and after that page gets rendered. But because value of DataModel in session bean 1 is not null, it is not repopulated.
I want to make it null from session bean 2. How can I do it?
I have tried some workaround. I tried raising an event from session bean 2 to call the factory method in session bean 1. But some variables which are injected in session bean 1 are supposed to be outjected from session bean 2. So these variables give "In attribute requires value" error if I raise an event.
Other workaround which I tried is: I added the page view id and the factory method name in pages.xml and converted the factory method into a non-factory method. Now method gets called and DataModel gets populated when the page is rendered. This creates another problem where my method gets called on any click of button or link on that page.
How can I solve this problem?
Waiting for a early reply,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049368#4049368
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049368
More information about the jboss-user