JSF2.2 faces flow method call node

678 Views Asked by At

I am currently using JSF 2.2 faces flow with WildFly8.2.0 as JAVA EE 7 server.

Can anyone has any idea of , how to use/configure method call node using XML file configuration ? I know how to invoke it using FlowBuilder API , but haven't found any tutorial on how to use XML for the same . (flowname-flow.xml).

Can anyone please help ?

1

There are 1 best solutions below

0
Atul On BEST ANSWER

Below is the syntax for calling a method call node in FacesFlow -

 <flow-definition id="someFlow">
        <start-node>start</start-node>   
        <method-call id="start">
            <method>#{bean.init}</method>
            <default-outcome>success</default-outcome>
        </method-call>  
        <view id="initSuccess">
                <vdl-document>/pages/init.xhtml</vdl-document>    
        </view>                     
 </flow-definition>

where #{bean.init} returns outcome as "initSuccess" upon which init.xhtml is rendered. success is the default outcome if method doesn't return anything.