-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
I was a little bit confused about the question. Now, I realize that this is binding/annotation question.
From ZK Example
ViewModel is as follows:
public class ShirtViewModel {
public List<String> getColors() {
return ShirtData.getColors();
}
ZUL code
<combobox id="cmbColor" width="150px"
model="@load(vm.colors)" selectedItem="@bind(vm.shirtColor)">
<template name="model">
<comboitem label="@load(each)"
image="@load(vm.getIconImage(each))" />
</template>
</combobox>
I believe the zul code, @load with List<String>
, manages convert List<String>
to ListModel<String>
. I think Binder kicks in to call some methods to convert them. Anyone knows what part of code does the job?
2 | No.2 Revision |
I was a little bit confused about the question. Now, I realize that this is binding/annotation question.
From ZK Example
ViewModel is as follows:
public class ShirtViewModel {
public List<String> getColors() {
return ShirtData.getColors();
}
ZUL code
<combobox id="cmbColor" width="150px"
model="@load(vm.colors)" selectedItem="@bind(vm.shirtColor)">
<template name="model">
<comboitem label="@load(each)"
image="@load(vm.getIconImage(each))" />
</template>
</combobox>
I believe the zul code,
whose colors from @load with List<String>@load(vm.colors)List<String> getColors()
, manages convert List<String>
to ListModel<String>
. I think Binder kicks in to call some methods to convert them. Anyone knows what part of code does the job?