NetUI Tag Library Documentation (Version 1.0.2)

netui-data
netui-data:callMethod Tag

Calls methods on any Java classes.

Syntax

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

Description

Calls methods on any Java classes.

The controlId attribute is used to specify the cclass to be called. The value returned is stored in the {pageContext...} data binding context object under the attribute specified by the resultId attribute.

For example, if you call a Java class with the following <netui-data:callMethod> tag...

     <netui-data:callMethod object="${pageFlow}" method="hello" resultId="helloMessage"/>
 

...the result of the call is stored in the pageScope data binding context under the attribute helloMessage.

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

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

In a 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.


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

See Also

<netui-data:methodParameter> Tag

<netui-data:callPageFlow> Tag

javax.servlet.jsp.PageContext