Parameters specified in the component specification are called formal parameters.
... <span jwcid="@TextField" value="ognl:userName" /> ... |
The value parameter of the TextField component is defined in its component specification and hence it is a formal parameter.
There is another kind of parameters that is not specified in the component specification and yet they can be bound for the component. This kind of parameters is called informal parameters.
... <span jwcid="@TextField" ... class="ognl:someStyleClass" /> ... |
The TextField component does not have a parameter named class defined in its specificaiton. Hence it is an informal parameter.
![]() | Tip |
|---|---|
| Informal parameters can take static values or can be bound to expressions or message keys like any other parameter! | |
![]() | Note |
|---|---|
| The direction of informal parameters is always "in". | |
Informal parameters are rendered by the component unaltered.
![]() | Informal Parameters that are Assets |
|---|---|
Tapestry includes a special case when an informal parameter is actually an asset; the URL for the asset is determined and supplied as the value for the attribute. | |
Informal parameters come in handy when there is a need to specify attributes that have no bearing on the component behavior, like the CSS style attributes for example. Whether a component is allowed to receive informal parameters is specified in the component specification. When not allowed, the component simply ignores the informal parameters. In most cases, where informal parameters are allowed, they are added as additional HTML attributes (there are a few special exceptions, such as the Script component).
Informal parameters do have some limitations. Informal parameters that conflict with the names of any formal parameters, or reserved parameters of the component, are silently ommitted. The comparison is case-insensitve. Thus, for a DirectLink component, you can not change the href attribute, even if you supply a Href (or other variation) informal parameter.