|
|||
TAG LIBRARIES: <netui> | <netui-data> | <netui-template> | |||
DETAIL: Syntax | Description | Attributes | Example | Implementing Class: org.apache.beehive.netui.tags.databinding.invoke.CallMethod |
Calls methods on any Java classes.
Syntax |
<netui-data:callMethod
[failOnError="failOnError"]
method="method"
[object="object"]
[resultId="resultId"] />
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 {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:callMethod>. For handling asynchronous methods see the help topic Calling Web Services and Custom Java Controls From A Page Flow
Attributes | |||||||
failOnError |
|
||||||
method |
|
||||||
object |
|
||||||
resultId |
|
<netui-data:methodParameter> Tag
javax.servlet.jsp.PageContext
|
|||
TAG LIBRARIES: <netui> | <netui-data> | <netui-template> | |||
DETAIL: Syntax | Description | Attributes | Example | Implementing Class: org.apache.beehive.netui.tags.databinding.invoke.CallMethod |