|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Inherited @Documented @Target(value={FIELD,METHOD,PARAMETER}) @Retention(value=RUNTIME) public @interface DataField
Indicates that the target Java reference (field, method parameter, or constructor parameter) in a Templated
Composite
component corresponds to an HTML element in the class's companion template.
This annotation can only be used in subclasses of Composite
that have been annotated with Templated
,
or in super-classes of such Composite
types.
The matching of Java references to HTML elements is performed as follows:
@DataField
annotation has a value()
argument, it is used as the reference name. For fields, the default name is the field name. Method and constructor
parameters have no default name, so they must always specify a value.
<div class="eat drink be-merry">matches Java references named eat, drink, or be-merry.
If more than one Java reference matches the same HTML element in the template, it is an error. For example, given a template containing the element <div class="eat drink be-merry">, the following Java code is in error:
Optional Element Summary | |
---|---|
String |
value
Specify the name of the data-field in the corresponding HTML template, which the annotated element
represents. |
public abstract String value
data-field
in the corresponding HTML template, which the annotated element
represents.
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |