<parameter> element

Appears in: <component-specification>

Defines a formal parameter of a component.

Figure B.24. <parameter> Attributes

NameTypeRequired ?Default ValueDescription
namestringyes The name of the parameter, which must be a valid Java identifier.
java-typescalar name, or class nameno 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.
requiredyes|nononoIf yes, then the parameter must be bound (though it is possible that the binding's value will still be null).
property-namestringno 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.
directionin|form|customnocustom

Identifies the semantics of how the parameter is used by the component. custom, the default, means the component explicitly controls reading and writing values through the binding.

in means the property is set from the parameter before the component renders, and is reset back to default value after the component renders.

form means that the property is set from the parameter when the component renders (as with in). When the form is submitted, the value is read from the property and used to set the binding value after the component rewinds.