0

New DataBinding && AnnnotateDataBinderInit

asked 2012-06-23 15:01:13 +0800

juergenmw gravatar image juergenmw
79 1

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

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2012-06-23 15:10:12 +0800

juergenmw gravatar image juergenmw
79 1

updated 2012-06-23 15:10:35 +0800

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

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-06-23 15:01:13 +0800

Seen: 105 times

Last updated: Jun 23 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More