[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2377) Conversation Switcher broken when using Explicit Conversations
Samuel Mendenhall (JIRA)
jira-events at lists.jboss.org
Thu Dec 13 15:00:51 EST 2007
Conversation Switcher broken when using Explicit Conversations
--------------------------------------------------------------
Key: JBSEAM-2377
URL: http://jira.jboss.com/jira/browse/JBSEAM-2377
Project: JBoss Seam
Issue Type: Bug
Components: Core
Reporter: Samuel Mendenhall
Priority: Minor
My test project consists of CatHome and KittenHome (hey, I like cats) with the respective entities, ect...
On the create method of CatHome and KittenHome I have:
@Begin(id="TheKittenConversation")
@Begin(id="TheCatConversation")
I have the standard conversation switcher syntax from the Docs. Now when I create a cat, then a kitten, then I go to switch back to the cat with the switcher, the page just refreshes and does not go anywhere. I did some debugging and the "actualOutcome" from the ./src/main/org/jboss/seam/faces/Switcher.java is the explicit id which in this case is "TheCatConversation". Ok, so the method returns this string, nothing happens, nothing is redirected, why would anything happen.
However, if I just do @Begin instead of the explicit ids and rerun the project then this piece of code is hit and the redirect happens:
else{
ConversationEntry ce = ConversationEntries.instance().getConversationEntry(conversationIdOrOutcome);
if (ce!=null)
{
resultingConversationIdOrOutcome = ce.getId();
System.out.println("ce.getId(): " + ce.getId() + " redirection...");
ce.redirect();
}
}
But if I use explict, that is never encountered because isOutcome is true and the else is not evaluated:
if (isOutcome)
{
resultingConversationIdOrOutcome = conversationIdOrOutcome;
actualOutcome = conversationIdOrOutcome;
}
So I removed the if else completely and Explicit conversations and the conversation switcher worked perfect. The resulting select method looks like:
public String select() {
String actualOutcome;
ConversationEntry ce = ConversationEntries.instance().getConversationEntry(conversationIdOrOutcome);
if (ce!=null)
{
resultingConversationIdOrOutcome = ce.getId();
ce.redirect();
}
actualOutcome = null;
return actualOutcome;
}
which means the outcome returned will always be null, versus in the case of explicit conversations, be the explict conversation name.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list