<field-binding> element

Appears in: <component>

Binds a parameter of an embedded component to a public static final field.

[Note]Note

Although the same result can be accomplished using a <binding> element and the OGNL expression @class-name@field-name, using a <field-binding> is more efficient, because Tapestry knows that the value is invariant.

The class name must be the qualified class name. If the package is ommitted, java.lang is assumed (this makes it easier to reference common fields such as Boolean.TRUE).

In an instantiated component, bindings can be accessed with the OGNL expression bindings.name.

Figure B.17. <field-binding> Attributes

NameTypeRequired ?Default ValueDescription
namestringyes The name of the parameter to bind.
field-namestringyes The name of a public static final field, in the form class-name.field-name.