You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2007/10/04 13:51:42 UTC

svn commit: r581866 - /myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/lib/EndConversationMethodBindingFacade.java

Author: skitching
Date: Thu Oct  4 04:51:41 2007
New Revision: 581866

URL: http://svn.apache.org/viewvc?rev=581866&view=rev
Log:
Fix problem in previous commit, where an instance with original=null would no longer terminate the conversation.
The previous behaviour has been restored (always terminate conversation).

Modified:
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/lib/EndConversationMethodBindingFacade.java

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/lib/EndConversationMethodBindingFacade.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/lib/EndConversationMethodBindingFacade.java?rev=581866&r1=581865&r2=581866&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/lib/EndConversationMethodBindingFacade.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/lib/EndConversationMethodBindingFacade.java Thu Oct  4 04:51:41 2007
@@ -64,12 +64,14 @@
 	 * @param conversation is the name of the conversation to conditionally be closed.
 	 *
 	 * @param onOutcomes is a collection of navigation strings that may be returned from the
-	 * invoked method. The following rules are then followed to determine whether the conversation
+	 * invoked method. One of the following rules is then used to determine whether the conversation
 	 * is ended or not:
 	 * <ul>
-	 * <li>If the action returned null, then the conversation is never ended.
-	 * <li>If the onOutcomes list is null or empty then the conversation is always ended.
-	 * <li>Otherwise, the conversation ends only if the returned value is in the onOutcomes list.
+	 * <li>If there was no action to invoke, end the conversation, else</li>
+	 * <li>If the action returned null, do not end the conversation, else</li>
+	 * <li>If the onOutcomes list is null or empty then end the conversation, else</li>
+	 * <li>If the returned value is in the onOutcomes list, then end the conversation, else</li>
+	 * <li>do not end the conversation.</li>
 	 * </ul>
 	 *
 	 * @param original is the EL expression to be invoked.
@@ -77,7 +79,7 @@
 	 * @param errorOutcome is a JSF navigation string to be returned if the action method
 	 * throws an exception of any kind. This navigation value is checked against the onOutcomes
 	 * values just as if the action method had actually returned this value. When not specified,
-	 * then on exception the current conversation is not terminated.
+	 * then on exception the current conversation is not ended.
 	 */
 	public EndConversationMethodBindingFacade(
 		String conversation,
@@ -155,7 +157,11 @@
 		finally
 		{
 			boolean endConversation;
-			if (returnValue == null)
+			if (original == null)
+			{
+				endConversation = true;
+			}
+			else if (returnValue == null)
 			{
 				endConversation = false;
 			}