New Features of ZK 6.0.1"
From Documentation
Tmillsclare (talk | contribs) m |
Tmillsclare (talk | contribs) |
||
Line 9: | Line 9: | ||
{{ZK PE and EE}} | {{ZK PE and EE}} | ||
− | Reference binding allows us to reference an | + | Reference binding allows us to reference an expression with a customized name. We can use this reference in another EL expression nested in the component that is binded to this reference. |
− | + | A simple example is as follows: | |
− | |||
− | |||
<source lang="xml" high="3,5,8"> | <source lang="xml" high="3,5,8"> | ||
Line 31: | Line 29: | ||
</source> | </source> | ||
− | + | Steps to use this feature: | |
+ | # Bind a custom attribute on a component with <tt> @ref </tt>. | ||
+ | # Use the custom attribute in other EL expressions that are nested in children components | ||
+ | |||
+ | The above code shows these implemented steps, for more information and more uses please visit the [[ZK_Developer's_Reference/MVVM/Data_Binding/Reference_Binding developer's reference]]. | ||
=Download & other resources= | =Download & other resources= |
Revision as of 04:48, 27 April 2012
Author
Timothy Clare, Potix Corporation
Timothy Clare, Potix Corporation
Date
April 2, 2012
April 2, 2012
Version
ZK 6.0.1
ZK 6.0.1
Reference Binding
- Available for ZK:
Reference binding allows us to reference an expression with a customized name. We can use this reference in another EL expression nested in the component that is binded to this reference.
A simple example is as follows:
<window apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('foo.MyVM')">
<vlayout p="@ref(vm.person)">
<hlayout>
First Name: <textbox value="@bind(p.firstName)" />
</hlayout>
<hlayout>
Last Name: <textbox value="@bind(p.lastName)" />
</hlayout>
</vlayout>
</window>
Steps to use this feature:
- Bind a custom attribute on a component with @ref .
- Use the custom attribute in other EL expressions that are nested in children components
The above code shows these implemented steps, for more information and more uses please visit the ZK_Developer's_Reference/MVVM/Data_Binding/Reference_Binding developer's reference.
Download & other resources
Comments
Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License. |