NetUI Tag Library Documentation (Version 1.0.1)

netui-data
netui-data:methodParameter Tag

A tag that is used to add an argument to a method that will be called on some object.

Syntax

<netui-data:methodParameter
    [null="boolean_passNullValue"]
    [type="string_type"]
    [value="expression_value"] >
    ... JSP content ...
</netui-data:methodParameter>

Description

A tag that is used to add an argument to a method that will be called on some object. This tag can be nested within tags that extend the AbstractCallMethod class. Those tags are:

The <netui-data:methodParameter> tags are used to parameterize the method that the org.apache.beehive.netui.tags.databinding.invoke.AbstractCallMethod class will call; each methodParameter tag represents a single parameter. These tags are evaluated in order and the parameters they describe are passed in order.

Overloaded methods on an object can be invoked by setting the type attribute on each methodParameter tag that is embedded in a method invocation tag. The type name must exactly match the primitive type name or the fully qualified class name of the argument. The methodParameter tags must also be in the order that they will be passed to this method. The value of the type attribute must be an exact match of the type if it were printed after having been accessed through Java reflection.

In order to pass null as an argument to a method, the null attribute must be set on this tag. Either the null attribute or the value attribute must be set on this tag.

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

Boolean. Determines if the parameter passed to the method is null.
type
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: No

Set a String matching the type of this parameter on the method to invoke.

This name should match the primitive type name or fully qualified class name of the parameters on the signature of the method to which this parameter will be passed.

For example:
Method SignatureArgument NameType value
addToPrice(int price)priceint
addToPrice(Integer price)pricejava.lang.Integer

value
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The value of the method parameter that will be passed to the method call.

Example

This example shows how to pass parameters to the method call foo(int integer, String string).

    <netui-data:methodParamter value="42"/>
    <netui-data:methodParamter null="true"/>
 
This will correspond to the method call:
     foo(42, null);
 
The following sample shows how to pass parameters to the method call foo(int integer, String string) where the class has both of the methods foo(int integer, String string) and foo(Integer integer, String string).
     <netui-data:methodParamter type="int" value="42"/>
     <netui-data:methodParamter type="java.lang.String" null="true"/>
 
This will correspond to the method call:
     foo(42, null);
 


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