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 2008/10/09 16:23:51 UTC

svn commit: r703171 - /myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java

Author: skitching
Date: Thu Oct  9 07:23:51 2008
New Revision: 703171

URL: http://svn.apache.org/viewvc?rev=703171&view=rev
Log:
Invoke new FlowInfo.cancel and FlowInfo.commit methods at appropriate times.

Modified:
    myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java

Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java?rev=703171&r1=703170&r2=703171&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java (original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java Thu Oct  9 07:23:51 2008
@@ -139,6 +139,7 @@
             if (outcome.equals(fa.getCancelWhen()))
             {
                 // cancel current flow
+
                 String callerViewId = flowInfo.getCallerViewId();
                 UIViewRoot callerViewRoot = flowInfo.getCallerViewRoot();
 
@@ -148,6 +149,9 @@
                 cm.activateConversationContext(parent);
                 cm.removeAndInvalidateConversationContext(ctx);
                 
+                // Mark flowInfo as cancelled
+                flowInfo.cancel();
+
                 nav.returnToView(callerViewRoot, callerViewId);
                 return;
             }
@@ -155,6 +159,7 @@
             if (outcome.equals(fa.getCommitWhen()))
             {
                 // commit current flow
+
                 String callerViewId = flowInfo.getCallerViewId();
                 UIViewRoot callerViewRoot = flowInfo.getCallerViewRoot();
 
@@ -166,6 +171,9 @@
                 // all the output parameters
                 Map map = flowInfo.getFlowAccept().readReturnParams(facesContext);
 
+                // Mark flowInfo as committed.
+                flowInfo.commit(map);
+
                 // Activate the parent and discard the child context
                 cm.activateConversationContext(parent);
                 cm.removeAndInvalidateConversationContext(ctx);