myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1570052 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
Date Thu, 20 Feb 2014 01:58:02 GMT
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
                 {



Mime
View raw message