volosied commented on code in PR #504:
URL: https://github.com/apache/myfaces/pull/504#discussion_r1093513692


##########
impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java:
##########
@@ -735,17 +709,59 @@ public NavigationCase getNavigationCommand(
                                 }
                                 continue;
                             }
-                            if (!complete && flowNode instanceof ViewNode)
+                            if(!complete && flowHandler.getCurrentFlow() == 
null) // See  MYFACES-4553 for details
                             {
-                                ViewNode viewNode = (ViewNode) flowNode;
-                                navigationCase = createNavigationCase(viewId, 
flowNode.getId(), 
-                                    viewNode.getVdlDocumentId());
-                                complete = true;
+                                flowHandler.transition(facesContext, null, 
targetFlow, null, outcomeToGo);
+                                
facesContext.getAttributes().put(STARTED_FLOW_TRANSITION, true);
+                                continue;
+                            }
+                            if (!complete && flowNode instanceof FlowCallNode)
+                            {
+                                // "... If the node is a FlowCallNode, save it 
aside as facesFlowCallNode. ..."
+                                FlowCallNode flowCallNode = (FlowCallNode) 
flowNode;
+                                targetFlow = 
calculateFlowCallTargetFlow(facesContext, 
+                                    flowHandler, flowCallNode, currentFlow);
+                                if (targetFlow != null)
+                                {
+                                    targetFlowCallNode = flowCallNode;
+                                    startFlow = true;
+                                    continue;
+                                }
+                                else
+                                {
+                                    // Ask the FlowHandler for a Flow for this 
flowId, flowDocumentId pair. Obtain a 
+                                    // reference to the start node and execute 
this algorithm again, on that start node.
+                                    complete = true;
+                                }
+                            }
+                            if (!complete && flowNode instanceof SwitchNode)
+                            {
+                                outcomeToGo = 
calculateSwitchOutcome(facesContext, (SwitchNode) flowNode);
+                                // Start over again checking if the node 
exists.
+                                //fromAction = currentFlow.getId();

Review Comment:
   ah, it was originally there, but let me remove it. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to