-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I select a comboitem programmatically that works fine, but when I open the combobox the wrong item is selected. The crazy thing is when I print the selected index on the open event the index doesn't match with the focused comboitem shown in the combobox but with the comboitem I selected programmatically
I use zk 7.0.1
hi,
zul:
<combobox id="cmbbxC" sclass="showcontact" readonly="true"
width="200px" placeholder="Edit..." />
controller:
public void onSelect$cmbbxC() {
changed = true;
System.out.println("SELCTED "+ cmbbxC.getSelectedIndex()); // correct index printed but wrong itme focused
}
private void fillParticipantCombobox(Combobox cmbbx, String cid, String name, String number) {
Comboitem citem = new Comboitem(name);
if (cid == null) {
citem.setStyle("background-color:#d15b47; color:white;text-align:center;");
}
citem.setDescription(number);
citem.setParent(cmbbx);
citem.setId(cid + "-" + number.replace(" ", "") + "#*#" + UUID.randomUUID());
}
Asked: 2014-08-01 10:44:36 +0800
Seen: 20 times
Last updated: Aug 27 '14
In ComboBox, Enter Key needs to be pressed twice for onOK event.
Combobox performance issue [closed]
Combo box OnDouble Click Event and SelectedItem
Combobox model='xxx' whcih is not ListModel
Combobbox selectedItem issues. Unsupported child for Combobox: <Listitem null>
hi @mock, Can you provide the zul/controller on how you did it?
chillworld ( 2014-08-01 12:12:35 +0800 )editIs it possible that the problem is if i use an Id thats 45 characters long und the first 36 that there are some troubles
mock ( 2014-08-06 08:41:26 +0800 )editnormally not, is it possible to make a small fiddle of it? Like this I personally have to less info to help you. (Don't see how you select programmaticly, I see your private method but not where it is called,...)
chillworld ( 2014-08-06 08:57:54 +0800 )editThe problem in this case is that some comboitems have the same label.
mock ( 2014-08-27 11:31:12 +0800 )edit