I just guess your usage according to your description. Could you provide related java code? or using http://zkfiddle.org/
hawk ( 2021-01-25 09:25:24 +0800 )editFirst time here? Check out the FAQ!
I need to make searching functionality of Chosenbox similar to Combobox when retrieving items from database. Unlike in Combobox when typing in Chosenbox it retrieves some itemes and throws away what was already entered. I would like to make it continuous.
I don't understand what you mean by "throw away". Could you give us an example or clear steps and describe what you see and what you expect?
For the current behavior:
(1) when you type a
, it lists items starting with a
in a popup
(2) then type m
, it lists items starting with am
It works just fine when i have a model for a chosenbox in place. But in my case the model has to be retrieved from datebase. When i type "a" it then goes to a database and retrieves model elements starting with "a", but it discards "a". The functionality i want to achive works in Combobox.
I think you might have replaced the ListModel
object you set to Chosenbox
when you load data from a database, this will cause a re-rendering and lose the user input.
You should keep using the same ListModel
and call ListModelList.add()
or ListModelList.addAll()
to add items. Then it won't cause re-rendering.
Unfortunalely it still doesn't work as expected.
I just guess your usage according to your description. Could you provide related java code? or using http://zkfiddle.org/
hawk ( 2021-01-25 09:25:24 +0800 )editAsked: 2021-01-19 22:56:17 +0800
Seen: 16 times
Last updated: Jan 21
How to let chexkbox horizontally arranged
Choosenbox : selectedObjects background color
extend the chosenbox component
radiogroup onCheck/onChange not calling to the binded command
Tooltips in chosenbox elements
Customize chosenbox emptymessage styling
Can't catch onSearch event when using SimpleListModel with chosenbox