@load"
From Documentation
Line 37: | Line 37: | ||
<label value="@load(vm.user.action, before='process')" /> | <label value="@load(vm.user.action, before='process')" /> | ||
</source> | </source> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | =Version History= | ||
+ | {{LastUpdated}} | ||
+ | {| border='1px' | width="100%" | ||
+ | ! Version !! Date !! Content | ||
+ | |- | ||
+ | | 6.0.0 | ||
+ | | February 2012 | ||
+ | | The MVVM was introduced. | ||
+ | |} | ||
{{ZKDevelopersReferencePageFooter}} | {{ZKDevelopersReferencePageFooter}} |
Revision as of 01:53, 9 February 2012
Syntax
@load( [EL-expression], [conditionKeyword]=[EvaluateOnce EL-expression] )
Description
Target Attribute: any (except viewModel, validationMessages)
Purpose: Restrict binder to load data from ViewModel only, not save back
For some attributes that don't save data back to ViewModel like listbox's model or label's value, it's equal to write @bind or @load .
- [conditionKeyword]=[EvaluateOnce EL-expression]
- This expression is optional unless you want to save or load upon a command.
- [conditionKeyword]
- It could be one of [ before | after ]
- [EvaluateOnce EL-expression]
- The evaluation result must be one or more command name.
- Command name must correspond to the name specified in Java annotation @Command in a ViewModel.
Example
<label value="@load(vm.user.id)" />
<label value="@load(vm.user.permission, after='showPermission')" />
<label value="@load(vm.user.permission, after={'showPermission', 'showAll'})" />
<label value="@load(vm.user.action, before='process')" />
Version History
Version | Date | Content |
---|---|---|
6.0.0 | February 2012 | The MVVM was introduced. |