[jboss-user] [JBoss Seam] - Named conversation and new instance redirected to Home? Best
enda
do-not-reply at jboss.com
Fri Feb 1 18:36:30 EST 2008
Hi lets say that I have an elements table. I can pick one element and go to entityHome so my conversation name is entity.id and everything is ok.
But I also have a navigation from my table to create new instance so I go to entityHomeEdit and my conversation is named new. After I save the new instance I want to redirect to entityHome , new entity has already id so it redirects as conversation namedentity.id ;(. That is wrong. Lets show you a code:
| <conversation name="personHome"
| parameter-name="personName"
| parameter-value="person-#{empty person.id ? 'new' : person.username}"/>
|
| <page view-id="/private/search/people/personHomeView.xhtml"
| conversation="personHome"
| conversation-required="true"
| no-conversation-view-id="/private/home.xhtml"/>
| <page view-id="/private/search/people/personHomeEdit.xhtml"
| conversation="personHome"
| conversation-required="true"
| no-conversation-view-id="/private/home.xhtml"/>
| <page view-id="/private/search/people/personHomeAjax.xhtml"
| conversation="personHome"
| conversation-required="true"
| no-conversation-view-id="/private/home.xhtml"/>
|
So I can stick in my ManagerBean some condition but it is ugly. Do you have some better solution? Eg something like kill conversation when new entity is saved and create new conversation with different name.
But it is in one request, can I do that? Is there access to the conversation from my ManagerBean, so I could kill the old named one (new) and build new named one (id).
I am sure that we all goes through it. What is the best solution?
Tomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125705#4125705
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125705
More information about the jboss-user
mailing list