Appears in: <component-specification>
Defines a formal parameter of a component. Parameters may be connected
(in
, form
or auto
)
or unconnected (custom
). If a parameter is
connected, but the class does not provide the property (or does, but
the accessors are abstract), then the framework
will create and use a subclass that contains the implementation
of the necessary property.
For auto
parameters, the framework will create a synthetic property
as a wrapper around the binding. Reading the property will read the value from
the binding and updating the property will update the binding value. auto
may only be used with required parameters. auto
is less
efficient than in
, but can be used even when the component
is not rendering.
Figure C.24. <parameter>
Attributes
Name | Type | Required ? | Default Value | Description |
---|---|---|---|---|
name | string | yes | The name of the parameter, which must be a valid Java identifier. | |
type | scalar name, or class name | no | Required for connected parameters. Specifies the type of the JavaBean property that a connected parameter writes and reads. The property must match this exact value, which can be a fully specified class name, or the name of a scalar Java type. | |
required | yes|no | no | no | If yes , then the parameter must be
bound (though it is possible that the binding's value
will still be null).
|
property-name | string | no | For connected parameters only; allows the name of the property to differ from the name of the parameter. If not specified, the property name will be the same as the parameter name. | |
direction | in|form|auto|custom | no | custom |
Identifies the semantics of how the parameter is used by the
component.
|
default-value | OGNL expression | no | Specifies the default value for the parameter, if the parameter is not bound. |