<netui-data:callMethod> Tag
Calls methods on any Java classes.
<netui-data:callMethod
[failOnError="failOnError"]
method="method"
[object="object"]
[resultId="resultId"] />
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 | 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 | Supports
runtime evaluation / JSP Expression Language: No |
|
Sets the name of a method to invoke on the target object. |
object |
Required: No | 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 | 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. |
Related Topics
<netui-data:methodParameter> Tag
<netui-data:callPageFlow> Tag
javax.servlet.jsp.PageContext