-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
Gotta MVVM form using BindComposer in ZUL:
apply="org.zkoss.bind.BindComposer"
Same ZUL file has a init:
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?>
I need the AnnotateDataBinder to enable following:
<listbox id="standardType" mold="select" model="@{vm.typeList}" selectedItem="@save(vm.selectedType)" > <listitem self="@{each=objects}" value="@{objects}"> <listcell label="@{objects.name}" /> </listitem> </listbox>
Without AnnotateDataBinder no listcells are being rendered (or only the Object's address, not the name)
The problem is if I use it this way I have issues storing the complete form. There is an additional textbox and storing the data results in this error:
org.zkoss.bind.SimpleForm: no method called name for null
How to solve this? How to access the bean's name and set it in the listcell without AnnotatDataBinder?
BR
WAIT - stupid me.
Of course the solution is http://books.zkoss.org/wiki/ZK_Developer%27s_Reference/MVVM/Data_Binding#Collection_Binding
Played around with too much different solutions, just ignore the question above.
Thanks
Asked: 2012-06-23 15:01:13 +0800
Seen: 105 times
Last updated: Jun 23 '12