Data Binding"
Line 4: | Line 4: | ||
In the following sections, we'll cover ZK Bind's annotations used on a ZUL. They are all used in '''component's attribute''' and have general format described in [[ZK_Developer%27s_Reference/Annotations/Annotate_in_ZUML| Annotate in ZUML]]: | In the following sections, we'll cover ZK Bind's annotations used on a ZUL. They are all used in '''component's attribute''' and have general format described in [[ZK_Developer%27s_Reference/Annotations/Annotate_in_ZUML| Annotate in ZUML]]: | ||
− | '''@AnnotationName('' | + | '''@AnnotationName(''attr-value1, attr-name2=attr-value2'')''' |
'''@AnnotationName(''attr-name1={attr-value1-1, attr-value1-2}, attr-name2=attr-value2'')''' | '''@AnnotationName(''attr-name1={attr-value1-1, attr-value1-2}, attr-name2=attr-value2'')''' | ||
Basically, the syntax consists of an annotation name with comma-separated key-value pairs. The binder treats an annotation's attribute value as an EL expression, and sets an EL expression without a attribute name to default attribute name "value". All annotations must define default attribute's value. | Basically, the syntax consists of an annotation name with comma-separated key-value pairs. The binder treats an annotation's attribute value as an EL expression, and sets an EL expression without a attribute name to default attribute name "value". All annotations must define default attribute's value. | ||
+ | |||
+ | For each ZK Bind supported annotation, the way a binder evaluates an EL expression is slightly different. Some annotation's EL expressions are evaluated only once like <tt>@id</tt> and <tt>@init</tt>. some annotations have reserved attribute names, "before" and "after", like <tt>@load</tt> and <tt>@save</tt>. | ||
+ | |||
+ | |||
+ | <!-- | ||
Line 65: | Line 70: | ||
: It could be any name, it's used as a key for parameter related Java annotation in a ViewModel. | : It could be any name, it's used as a key for parameter related Java annotation in a ViewModel. | ||
− | + | --> | |
{{ZKDevelopersReferenceHeadingToc}} | {{ZKDevelopersReferenceHeadingToc}} | ||
{{ZKDevelopersReferencePageFooter}} | {{ZKDevelopersReferencePageFooter}} |
Revision as of 09:09, 3 January 2013
In the following sections, we'll cover ZK Bind's annotations used on a ZUL. They are all used in component's attribute and have general format described in Annotate in ZUML:
@AnnotationName(attr-value1, attr-name2=attr-value2)
@AnnotationName(attr-name1={attr-value1-1, attr-value1-2}, attr-name2=attr-value2)
Basically, the syntax consists of an annotation name with comma-separated key-value pairs. The binder treats an annotation's attribute value as an EL expression, and sets an EL expression without a attribute name to default attribute name "value". All annotations must define default attribute's value.
For each ZK Bind supported annotation, the way a binder evaluates an EL expression is slightly different. Some annotation's EL expressions are evaluated only once like @id and @init. some annotations have reserved attribute names, "before" and "after", like @load and @save.