0

Problem with setSelectedItem (Combobox)

asked 2014-03-11 09:47:26 +0800

salbader gravatar image salbader
15 5

updated 2014-03-11 09:51:43 +0800

Hello, I have a problem with the specification of setSelectedItem (combobox). I found this note:

Note: if the label of comboitem has the same more than one, the first comboitem will be selected at client side, it is a limitation of Combobox and it is different from Listbox.

I have same more than one in my combobox, but they are different in description and I don't want to select always the first one. I want to select the right one. is there a zk solution for my problem?

delete flag offensive retag edit

Comments

where is your problem?????????????

sitansu ( 2014-03-11 13:25:32 +0800 )edit

You can select CBX Items via setSelectedIndex(index).

IngoB ( 2014-03-12 07:49:23 +0800 )edit

Hello IngoB, i will try it. Thanks

salbader ( 2014-03-12 08:45:12 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-03-12 08:52:45 +0800

chillworld gravatar image chillworld flag of Belgium
5367 4 9
https://github.com/chillw...

updated 2014-03-12 08:53:58 +0800

Or use an listbox as in this implementation (so like you said won't have that limitation):

http://www.zkoss.org/zkdemo/combobox/customizable_combobox

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2014-03-11 09:47:26 +0800

Seen: 22 times

Last updated: Mar 12 '14

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