myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "l.penet@senat.fr" <l.pe...@senat.fr>
Subject Re: @FlowScoped, @Named and @ManagedBean
Date Thu, 13 Feb 2014 18:12:38 GMT
On 13/02/2014 19:01, Leonardo Uribe wrote:
> Hi
>
> Thanks for the example. It helps to clarify the problem. The
> definition of the flow has a problem:
>
>      @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();
>      }
>
> In this part:
>
> flowBuilder.viewNode(flowId,
>                  "/" + flowId + "/" + flowId + ".xhtml").
>                  markAsStartNode();
>
> you are using the flow id as a viewNodeId. That confuses the
> navigation algorithm because the spec says that an outcome can be a
> flowId, and in that sense a flowId is a global identifier that cannot
> be reused. The fix is just set another id:
>
>          flowBuilder.viewNode("start",
>                  "/" + flowId + "/" + flowId + ".xhtml").
>                  markAsStartNode();
>
> The example only requires some small changes in FlowScopedBean and that's it.
ok for this one, I will try it tomorrow. And can you tell me what was 
wrong with XML file (or the empty XML file) ?

Thank you,

Ludovic
|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|


Mime
View raw message