...
In Tapestry, a parameter is not a slot into which data is pushed: it is a connection between a field of the component (marked with the @Parameter annotation) and a property or resource of the component's container. In most simple examples, the component's container is the page, but since components can have templatesbe nested, often the container of a component is another component.
...
By placing a prefix in front of the value, you can change how Tapestry interprets the remainder of the expression (the part after the colon):
Prefix | Description |
---|---|
asset: | The relative path to an asset file (which must exist) |
block: | The id of a block within the template |
component: | The id of another component within the same template |
context: | Context asset: path from context root |
literal: | A literal string . |
nullfieldstrategy: | Used to locate a pre-defined NullFieldStrategy |
message: | Retrieves a string from the component's message catalog |
prop: | A property expression to read or update |
symbol: | Used to read one of your symbols |
translate: | The name of a configured translator |
validate: | A validator specification used to create some number of field validators |
var: | Allows a render variable of the component to be read or updated |
...
Only prop: and var: binding prefixes are updateable (but you must not use the ${..} syntax here; see the next section warning below).
Each parameter has a default prefix, defined by the component, that is used when the prefix is not provided. The most common are "literal:" and "prop:".
...
In rare cases, it is desirable to defeat the caching; this can be done by setting the cache() attribute of the @Parameter annotation to false.
Anchor | ||||
---|---|---|---|---|
|
Don't use the ${...} syntax!
...