You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2014/02/20 02:58:02 UTC

svn commit: r1570052 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java

Author: lu4242
Date: Thu Feb 20 01:58:02 2014
New Revision: 1570052

URL: http://svn.apache.org/r1570052
Log:
MYFACES-3859 Allow use the flowId as a nodeId inside the same flow

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java?rev=1570052&r1=1570051&r2=1570052&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java Thu Feb 20 01:58:02 2014
@@ -486,7 +486,24 @@ public class NavigationHandlerImpl
                 // current flow or the id of another flow
                 if (targetFlow != null)
                 {
-                    startFlow = true;
+                    if (flowHandler.isActive(facesContext, targetFlow.getDefiningDocumentId(), targetFlow.getId()))
+                    {
+                        // If the flow is already active, there is a chance that a node id has the same name as
+                        // the flow and if that so, give preference to that node instead reenter into the flow.
+                        FlowNode flowNode = targetFlow.getNode(outcome);
+                        if (flowNode != null)
+                        {
+                            checkFlowNode = true;
+                        }
+                        else
+                        {
+                            startFlow = true;
+                        }
+                    }
+                    else
+                    {
+                        startFlow = true;
+                    }
                 }
                 else
                 {