Want to pass the value which is selected from previous combo box to new combo-box

asked 2011-12-12 11:45:29 +0800

javaenthu gravatar image javaenthu
141 2

First I am very new to ZK. I loved its features but i don't know still how to use all.

I am creating a combobox the values (model comes by calling the composer class) and variable name is allPlans.
Now I am selecting this in a comboBox and clicking on search button on the UI.
Once I press the UI , I am opening the page and on this page in doAfterCompose () method I am calling the composer method to get me to the model and I am setting this as model of the combobox. I am trying to set the selected value by combobox.setSelectedIndex() . (on the previous page I am saving the value of the selected index in a variable ) and i am trying to get here. I am able to get the index but by using combobox.setSelectedIndex() it gives me exception saying arrayIndexOutOfBound.

Any idea why its happening?

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2011-12-12 15:10:53 +0800

benbai gravatar image benbai
2228 6


Could you provide a sample that can reproduce this problem?


link publish delete flag offensive edit

answered 2011-12-12 16:59:25 +0800

carpolva gravatar image carpolva
155 4


Make sure your combobox model is no empty at the moment of setting its index. Can you provide us a more specific example? :)


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




Asked: 2011-12-12 11:45:29 +0800

Seen: 142 times

Last updated: Dec 12 '11

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