-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have a textbox with bing value to vm.value
<textbox id="myTextbox" value="@bind(vm.value)"/>
on my combobox change I assign value to textbox as below
<combobox onChange="myTextbox.value = self.getSelectedItem().getValue()">
<comboitem label="hello" value="1" />
<comboitem label="hi" value="2" />
</combobox>
textbox value changed, but it doesn't change value on vm.
I use zk9
<combobox selectedItem="@bind(vm.value)" >
gives you comboitem's value.
it should be <combobox value="@bind(vm.value)"/>
Don't mix MVC and MVVM pattern.
when you call component API setValue()
, ZK doesn't know it so it can't notify the change on vm.value
.
if you use ZK 9 and depending on your requirements, we suggest other alternative components:
listbox select mold or selectbox.
Asked: 2019-12-31 10:52:29 +0800
Seen: 30 times
Last updated: Jan 13 '20
How to capture onScroll Event of Combobox
combobox does not scroll autocompleted text into view
I want to take different value from label(value) and pass to @bind object
Combobox sometimes clears the selected item
zk combobox filtering option is not working inside listbox .
Zk create custom event for COmbo box?
Fetching Key-Value pair for ComboBox using SimpleListModel
How to set selected combobox when using setModel
ComboBox autocomplete does not work with onOk event [closed]