[seam-commits] Seam SVN: r7780 - trunk/src/main/org/jboss/seam/core.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Mar 31 19:02:25 EDT 2008
Author: pete.muir at jboss.org
Date: 2008-03-31 19:02:24 -0400 (Mon, 31 Mar 2008)
New Revision: 7780
Modified:
trunk/src/main/org/jboss/seam/core/ConversationPropagation.java
Log:
JBSEAM-2583
Modified: trunk/src/main/org/jboss/seam/core/ConversationPropagation.java
===================================================================
--- trunk/src/main/org/jboss/seam/core/ConversationPropagation.java 2008-03-31 22:24:49 UTC (rev 7779)
+++ trunk/src/main/org/jboss/seam/core/ConversationPropagation.java 2008-03-31 23:02:24 UTC (rev 7780)
@@ -106,24 +106,27 @@
if ( viewId!=null )
{
Page page = Pages.instance().getPage(viewId);
-
- ConversationIdParameter currentConversationIdParameter = null;
if(conversationName != null)
{
- currentConversationIdParameter = Pages.instance().getConversationIdParameter(conversationName);
+ ConversationIdParameter currentConversationIdParameter = Pages.instance().getConversationIdParameter(conversationName);
if(currentConversationIdParameter == null)
{
throw new IllegalStateException("The conversationName specified: " + conversationName + ", does not exist.");
}
+ // Try to restore the conversation from parameters (the user has specified the exact conversation to restore using f:param)
+ conversationId = currentConversationIdParameter.getRequestConversationId(parameters);
+ if (conversationId == null)
+ {
+ // Try to restore the conversation from the EL expression on the conversation definition
+ conversationId = currentConversationIdParameter.getConversationId();
+ }
}
else
{
- currentConversationIdParameter = page.getConversationIdParameter();
- }
-
- conversationId = currentConversationIdParameter.getRequestConversationId(parameters);
+ conversationId = page.getConversationIdParameter().getRequestConversationId(parameters);
+ }
//TODO: how about the parent conversation id?
}
More information about the seam-commits
mailing list