-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hi,
I am having 2 dependent comboboxes and want to populate the data on the selection of one combo value to another by using onOpen event. But I am getting stuck when I enter 'a' value via keyboard bydefault first item related to "a" got selected and when I press enter it is giving Null pointer because the selected item does not contain any value.
Even when I enter any letter and traverse through mouse at first time, press enter on any item then nothing gets populated on another combo and only previous data persist in both comboboxes. What can be the possible solution to overcome this issue? I have documented my code in fiddle please check it ComboBox Data Binding issue
Hello psingh,
You should use the onChanging Event as shown at the following documentation:
https://www.zkoss.org/wiki/ZKComponentReference/Input/Combobox#TheonChangingEvent
Best Regards,
Darksu
Hi Darksu,
If you look at my problem there is fiddle link where you can get the whole code. See the link below:
http://zkfiddle.org/sample/184fg41/1-MVVM-dependent-comboboxes#source-1
Hello psingh ,
Please use the following:
<combobox model="@load(vm.comboModel1)" visible="@load(vm.infoFromComboboxesRequired)" autodrop="true"
selectedItem="@bind(vm.comboValue1)" onChange="@command('combo1Selected',selected=self)">
<template name="model">
<comboitem label="@load(each)" value="@load(each)"/>
</template>
</combobox>
Best Regards,
Darksu
Asked: 2016-11-18 08:10:01 +0800
Seen: 42 times
Last updated: Nov 27 '16
Combobox issue :Taking time to load
In ComboBox, Enter Key needs to be pressed twice for onOK event.
How to add an empty value to a combobox?
combobox chose value by enter dosn't work
infinite parent child hierarchy combobox
Combobox with multiple items taking longer time to render