0

ZK 3.6.5 Databinding problem?

asked 2011-02-11 05:56:27 +0800

kkurt gravatar image kkurt
300 1 2

updated 2011-02-11 05:57:54 +0800

Hi;
I have combobox binded to controller list :

<z:combobox id="itemCMB" width="100px" model="@{controller.itemList}"  autodrop="true">
     <z:comboitem self="@{each=item}" value="@{item.value}" label="@{item.label}"/>
</z:combobox>

I am trying to select second item in controller when window loaded (in onCreate$myWin)
itemCMB.setSelectedIndex(2);

List size is 10 but, i am getting error:
org.zkoss.zk.ui.impl.UiEngineImpl handleError:1133 >>org.zkoss.zk.ui.UiException: Out of bound: 2 while size=0
at org.zkoss.zul.Combobox.setSelectedIndex(Combobox.java:538)

Other problem is; when i use "selectedItem="@{controller.selItem}"
and in controller "selItem=2"; it does not select... (getter and setter methods are available)


What is the problem?
(I am using zk-bin-3.6.5-FL-2011-01-25)

delete flag offensive retag edit
Be the first one to reply this discussion!
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: 2011-02-11 05:56:27 +0800

Seen: 220 times

Last updated: Feb 11 '11

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