NetUI Tag Library Documentation (Version 1.0.1)

netui-data
netui-data:callPageFlow Tag

Calls methods on the current Page Flow.

Syntax

<netui-data:callPageFlow
    [failOnError="failOnError"]
    method="method"
    [object="string_or_expression_object"]
    [resultId="resultId"] >
    ... JSP content ...
</netui-data:callPageFlow>

Description

Calls methods on the current Page Flow. If no Controller file is found, an org.apache.beehive.netui.tags.databinding.invoke.ObjectNotFoundException is thrown and the tag execution fails. Any return value is stored in the ${pageScope...} data binding context object under the attribute specified by the resultId attribute.

For example, given a hello method and the following <netui-data:callPageFlow> tag:

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

the result of the call is stored in the ${pageScope} JSP EL implicit object under the attribute helloMessage. It will be accessible via ${pageScope.helloMessage} and can be used as:

     <netui:span value="${pageScope.helloMessage}"/>
 

In JSP scriptlet, the result can be retrieved by calling the getAttribute() method on the javax.servlet.jsp.PageContext object:

     <%= pageContext.getAttribute("helloMessage") %>
 

Attributes
failOnError
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: No

Sets whether or not to report exceptions to the page when errors occur invoking a method on an object.
method
Required: Yes  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: No

Sets the name of a method to invoke on the target object.
object
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

A string or data binding expression that names the class on which to call a method.
resultId
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: No

Sets the identifier at which the result of invoking the method will stored. Once stored, the result of the reflective invocation will be available via the JSP EL implicit object ${pageScope} with the attribute name set via this property.

Example

In the following sample, the <netui-data:callPageFlow> tag calls the sumCartItems method on the Controller file. The org.apache.beehive.netui.tags.html.Span tag accesses the result through the ${pageScope} data binding context.

      <netui-data:callPageFlow method="sumCartItems" resultId="cartSum">
          <netui-data:methodParameter value="${pageFlow.cart.lineItemList}"/>
      </netui-data:callPageFlow>
      ...
      <netui:span value="${pageScope.cartSum}"/>
 


Tag Information
Tag Classorg.apache.beehive.netui.tags.databinding.invoke.CallPageFlow
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone