[jboss-user] [JBoss Seam] - How to not propagate conversations??
do-not-reply at jboss.com
Fri Jan 18 18:05:21 EST 2008
Seam 2.0.0.GA, Facelets
after a couple of months of continuous work with Seam, I today figured out that I still did not completely understand concepts of conversations and their propagation.
I have an application with a start page (rendered using an EVENT scoped bean) and three pages which are conversation scoped. All of this three have an "Ok" and a "Cancel" button which lead back to the start page.
Every page is embedded in a template which renders a menu on top. From that menu, you can reach any of the four pages. Clicking on the menu shall cancel the page currently displayed.
There are three conversation scoped beans for the three pages. Any of them has a @Create @Begin method to start it's conversation. The action methods for Ok and Cancel are marked as @End.
For the menu, I want to use rich:dropDownMenu, but have the same problem if I use s:link. I have marked every menu entry with
| <s:conversationPropagation type="end" />
(or s:link with propagation="end").
Then I put a breakpoint on bean constructor and on @Remove methods and clicked around in my menu.
Clicking the buttons works absolutely fine. Beans are created and destroyed exactly when I expect them to be.
But clicking around in the menu has strange results. The beans get never destroyed when expected, beans get reused sometimes and so on.
A propagation of "none", however, works like expected. New conversations are started every time, and the old ones hang around unused until timed out. But this is not what I want - in fact, I want to cancel the conversation when the menu is selected. This isn't unusual, I think, so I am sure I am doing something completely wrong, or?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121455#4121455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121455
More information about the jboss-user