netui-data:callPageFlow Tag

<netui-data:callPageFlow> Tag

This tag calls a method on the Controller file (= JPF file) in the same directory as the JSP page.

Syntax

<netui-data:callPageFlow
    [failOnError="boolean_failOnError"]
    method="string_method"
    [object="string_or_expression_object"]
    [resultId="string_resultId"] />

Description

This tag calls a method on the Controller file (= JPF file) in the same directory as the JSP page. If no Controller file is found, an ObjectNotFoundException is thrown and the tag execution fails. Any return value is stored in the {pageContext...} data binding context object under the attribute specified by the resultId attribute.

For example, if you call the hello method with the following <netui-data:callPageFlow> tag...

    <netui-data:callPageFlow
          method="hello" 
          resultId="helloMessage" 
          />

...the result of the call is stored in the {pageContext...} data binding context under the attribute helloMessage.

The result can be retrieved with the data binding expression {pageContext.helloMessage}

   <netui:label value="{pageContext.helloMessage}"/>
In a scriptlet, the result can be retrieved by calling the getAttribute() method on the javax.servlet.jsp.PageContext object:
    <%= pageContext.getAttribute("helloMessage") %>

Note that only synchronous methods can be called with <netui-data:callPageFlow>. For handling asynchronous methods see the help topic Calling Web Services and Custom Java Controls From A Page Flow

Attributes

failOnErrorBoolean. If set to true, any errors occuring while invoking the control method will be be reported in-line on the JSP page.
 
RequiredSupports runtime expression evaluationData bindable
NoNoNo

methodThe name of the method to invoke
 
RequiredSupports runtime expression evaluationData bindable
YesNoNo

objectA string or data binding expression that names the class on which to call a method.
 
RequiredSupports runtime expression evaluationData bindable
NoNoRead Only

resultIdThe data returned by the method is loaded into the PageContext object, under this property name.
 
RequiredSupports runtime expression evaluationData bindable
NoNoNo

Sample

In the following sample, the <netui-data:callPageFlow> tag calls the sumCartItems method on the Controller file. The <netui:label> tag accesses the result through the {pageContext...} data binding context.
     <netui-data:callPageFlow method="sumCartItems" resultId="cartSum">
          <netui-data:methodParameter value="{pageFlow.cart.lineItemList}"/>
      </netui-data:callPageFlow>
      ...
      <netui:label value="{pageContext.cartSum}"/>

Code Sample

[BEA_HOME]/weblogic81/samples/workshop/SamplesApp/tagSamples/netui_databinding/callPageFlow/callPageFlow.jsp

Related Topics

<netui-data:callPageFlow> Tag Sample

<netui-data:methodParameter> Tag

<netui-data:callMethod> Tag

<netui-data:callControl> Tag