-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
-
Security Level: Jimmy
-
None
-
ZK 8.0.1 S1
-
None
on 8.0.1.FL.20151111 and later:
ListmodelList.setSelection, or addToSelection does not update the combobox main textbox.
This is likely related to following commit:
https://github.com/zkoss/zk/commit/59a6252be31615cdff192a3357249ccf1955cb61#diff-e1c31ce5bd0ed2c14db649d67bee47f7L114
on http://tracker.zkoss.org/browse/ZK-2937
See following example:
click on the button to select 1st Item.
Expected : item is selected and item value is set in the textbox.
Result : item is selected (in the model) but value is not set in the textbox.
<zk> <zscript><![CDATA[ ListModelList myModel = new ListModelList(); myModel.add("Value1"); myModel.add("Value2"); myModel.add("Value3"); ]]> </zscript> <combobox id="cmb" model="${myModel}"/> <button label="set selection on 1st item" onClick='cmb.model.clearSelection();cmb.model.addToSelection(cmb.model.get(0))'/> </zk>
Additional data:
In combobox:setSelectedItem(Comboitem item) (called when model is updated)
setValueDirectly(item.getLabel()); set the value of the component, but does not trigger update on its own.
the smartUpdate("selectedItemUuid_", item.getUuid()); instruction cause the widget to correctly update its selected item property, but not its value.
- relates to
-
ZK-2937 The Combobox overwrites input text with previously selected item
- Closed