# com.bea.wlw.netui.tags.databinding.invoke
CallMethod Class

public class CallMethod
extends `AbstractCallMethod`

An abstract base class for tags that are capable of reflectively invoking methods. Specializations of this tag provide method implementations that locate the object on which to invoke the method and that handle any return value from the invoked method.

The `CallMethod` tag can have child tags of type `MethodParameter```; these tags must be in the same order as the parameter list in the method signature of the method that will be invoked. To invoke an overloaded method, the `` property must be set to the String name of the type to pass to the method. If the type attribute values on nested `MethodParameter``` tags do not match any method signature, an error will be reported in the page.

Attribute Descriptions
Attribute | Required | Runtime Expression Evaluation | Data Bindable
--- | --- | --- | ---
failOnError | No | No | No
A boolean that if `true` will cause the tag to report any method invocation errors in-line in the rendered page.
method | No | No | No
The method to invoke on an object.
object | No | No | Yes
References an object on which the method will be invoked.
resultId | No | No | No
The `PageContext``` attribute name where the result, if non-null, is stored.

Related Topics

<netui-databinding:callMethod> Tag Sample
``MethodParameter``
``CallControl``
``CallPageFlow``

Hierarchy
  `Object`
  `TagSupport`
  `BodyTagSupport`
  `AbstractBaseTag`
  `AbstractCallMethod`
  `CallMethod`

All Implemented Interfaces
  `BodyTag`, `IterationTag`, `Serializable`, `Tag`

Direct Known Subclasses
  `CallPageFlow`, `ChoiceMethod`

## Field Summary

Fields from com.bea.wlw.netui.tags`.`AbstractBaseTag``
``ATTR_GENERAL`, `ATTR_GENERAL_EXPRESSION`, `ATTR_JAVASCRIPT`, `ATTR_STYLE`, `CLASS`, `ID`, `JAVASCRIPT_STATUS`, `NAME`, `NETUI_UNIQUE_CNT`, `ONCLICK`, `ONDBLCLICK`, `ONKEYDOWN`, `ONKEYPRESS`, `ONKEYUP`, `ONMOUSEDOWN`, `ONMOUSEMOVE`, `ONMOUSEOUT`, `ONMOUSEOVER`, `ONMOUSEUP`, `STYLE`, `TABINDEX``

Fields from javax.servlet.jsp.tagext`.`BodyTagSupport``
`bodyContent`

Fields from javax.servlet.jsp.tagext`.`TagSupport``
`id, pageContext`

Fields from interface javax.servlet.jsp.tagext`.`BodyTag``
`EVAL_BODY_BUFFERED, EVAL_BODY_TAG`

Fields from interface javax.servlet.jsp.tagext`.`IterationTag``
`EVAL_BODY_AGAIN`

Fields from interface javax.servlet.jsp.tagext`.`Tag``
`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

## Constructor Summary

CallMethod()

## Method Summary

`protected final `Method`` | `findMethod`(`Object` target, `String` methodName, boolean verifyTypes) The default findMethod implementation is an uncached search of all of the methods available on the Class of the `target`
`public `String`` | `getObject`() Get the object on which a method will be invoked.
`protected `String`` | `getObjectName`() Get the name of the object that is the target of the invocation.
`public `String`` | `getTagName`() Get the name of this tag.
`protected void` | `localRelease`() Reset all of the fields of this tag.
`protected `Object`` | `resolveObject`() Resolve the object on which the method should be invoked.
`public void` | `setObject`(`String` object) Set the object on which to invoke a method.

Methods from `com.bea.wlw.netui.tags.databinding.invoke.`AbstractCallMethod``
``addParameter`, `doEndTag`, `doStartTag`, `getFailOnError`, `getMethod`, `getParameterNodes`, `getResultId`, `handleReturnValue`, `setFailOnError`, `setMethod`, `setResultId``

Methods from `com.bea.wlw.netui.tags.`AbstractBaseTag``
``addTagIdMapping`, `evaluateAttributeToString`, `filter`, `filter`, `getJavaScriptUtils`, `getNearestForm`, `getScriptReporter`, `getUserLocale`, `localRelease`, `registerTagError`, `release`, `renderAttribute`, `rewriteName`, `write``

Methods from `javax.servlet.jsp.tagext.`BodyTagSupport``
`doAfterBody, doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent`

Methods from `javax.servlet.jsp.tagext.`TagSupport``
`doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue`

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from interface `javax.servlet.jsp.tagext.`BodyTag``
`doInitBody, setBodyContent`

Methods from interface `javax.servlet.jsp.tagext.`IterationTag``
`doAfterBody`

Methods from interface `javax.servlet.jsp.tagext.`Tag``
`doEndTag, doStartTag, getParent, release, setPageContext, setParent`

## Constructor Detail

### CallMethod

    public CallMethod()

## Method Detail

### findMethod(Object, String, boolean) Method

    protected final Method findMethod(Object target,
                                      String methodName,
                                      boolean verifyTypes)

Description copied from `AbstractCallMethod.findMethod(Object, String, boolean)`
The default findMethod implementation is an uncached search of all of the methods available on the Class of the `target`

Overrides
  `AbstractCallMethod.findMethod(Object, String, boolean)`

#### Parameters

target
  the object from which to find the method

methodName
  the name of the method to find

verifyTypes
  a boolean that if true will match the type names in addition to the String method name

#### Returns

a Method object matching the methodName and types, if `verifyTypes` is true. `null` otherwise.

### getObject() Method

    public String getObject()

Get the object on which a method will be invoked.

### getObjectName() Method

    protected String getObjectName()

Description copied from `AbstractCallMethod.getObjectName()`
Get the name of the object that is the target of the invocation. This is a generic method for this tag that enables more specific error reporting.

Overrides
  `AbstractCallMethod.getObjectName()`

#### Returns

a name for the object on which the method will be invoked.

### getTagName() Method

    public String getTagName()

Get the name of this tag. This is used to identify the type of this tag for reporting tag errors.

Overrides
  `AbstractBaseTag.getTagName()`

#### Returns

a constant String representing the name of this tag.

### localRelease() Method

    protected void localRelease()

Reset all of the fields of this tag.

Overrides
  `AbstractCallMethod.localRelease()`

### resolveObject() Method

    protected Object resolveObject()
         throws ObjectNotFoundException

Description copied from `AbstractCallMethod.resolveObject()`

Resolve the object on which the method should be invoked. If there are errors resolving this object, this method will throw an `ObjectNotFoundException`.
If the object is not found but no exception occurred, this method should return null.

Overrides
  `AbstractCallMethod.resolveObject()`

#### Returns

the object on which to reflectively invoke the method.

#### Exceptions

``ObjectNotFoundException``

### setObject(String) Method

    public void setObject(String object)

Set the object on which to invoke a method.

#### Parameters

object
  the object on which to invoke a method