myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Created] (MYFACES-3859) Allow use the flowId as a nodeId inside the same flow
Date Thu, 20 Feb 2014 01:57:26 GMT
Leonardo Uribe created MYFACES-3859:
---------------------------------------

             Summary: Allow use the flowId as a nodeId inside the same flow
                 Key: MYFACES-3859
                 URL: https://issues.apache.org/jira/browse/MYFACES-3859
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-344
    Affects Versions: 2.2.0
            Reporter: Ludovic PĂ©net
            Assignee: Leonardo Uribe


The user reported this simple example:

    @Produces
    @FlowDefinition
    public Flow defineFlow(@FlowBuilderParameter FlowBuilder flowBuilder) {
            String flowId = "flux";
        flowBuilder.id("", flowId);
        flowBuilder.viewNode(flowId, 
                "/" + flowId + "/" + flowId + ".xhtml").
                markAsStartNode();
        flowBuilder.returnNode("returnFromFlux").
                fromOutcome("#{flowScopedBean.return}");
 
        return flowBuilder.getFlow();        
    }

Please note there is a view node with the same name used by the flowId as nodeId. The current
algorithm does not detect this case, so it is interpreted like if the user want to enter into
the flow, causing a loop. But the code in transition(...) avoid the recursion and instead
get out of the flow. 

It is better if we check this case and deal with it properly before enter into a flow. 

Please note in a normal case click to enter into a flow twice cause get out of the flow and
enter into the flow again, which is correct. But in this case, the resulting flow will not
have that behavior and instead the navigation goes to the node identified as start node without
exit from the flow.





--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message