Revision history [back]

click to hide/show revision 1
initial version

asked 2017-05-01 12:49:01 +0800

hrv gravatar image hrv

Fetching Key-Value pair for ComboBox using SimpleListModel

Hi All,

I want my Combobox to be Autosuggest box, where I am fetching all products. Now to make Combobox autosuggest I a understand the only option is to load it using setModel function.

But the problem I am facing here is if I set String array like below, I can't get the product id of it. (ListModel lml=new SimpleListModel(Dictionary.getDirectory()))

For now I am not fetching product list from the DB, it's just from the server - JVM.

Please help me solve the issue.

Fetching Key-Value pair for ComboBox using SimpleListModel

Hi All,

I want my Combobox to be Autosuggest box, where I am fetching all products. Now to make Combobox autosuggest I a understand the only option is to load it using setModel function.

But the problem I am facing here is if I set String array like below, I can't get the product id of it. it.

(ListModel lml=new SimpleListModel(Dictionary.getDirectory()))

For now I am not fetching product list from the DB, it's just from the server - JVM.

Please help me solve the issue.

Fetching Key-Value pair for ComboBox using SimpleListModel

Hi All,

I want my Combobox to be Autosuggest box, where I am fetching all products. Now to make Combobox autosuggest I a understand the only option is to load it using setModel function.

But the problem I am facing here is if I set String array like below, I can't get the product id of it.

(ListModel lml=new SimpleListModel(Dictionary.getDirectory()))

For now I am not fetching product list have taken reference from the DB, it's just from the server - JVM.w3.zkoss.org/zkdemo/combobox/autocomplete

Please help me solve the issue.

Fetching Key-Value pair for ComboBox using SimpleListModel

Hi All,

I want my Combobox to be Autosuggest box, where I am fetching all products. Now to make Combobox autosuggest I a understand the only option is to load it using setModel function.

But the problem I am facing here is if I set String array like below, I can't get the product id of it.

(ListModel lml=new SimpleListModel(Dictionary.getDirectory()))

I have taken reference from w3.zkoss.org/zkdemo/combobox/autocomplete

Please help me solve the issue.

Here is the fiddle that has the example, currently I am setting all values in combobox, which I want to be Key-Value pairs. zkfiddle.org/sample/3ifu29k/6-Another-new-ZK-fiddle

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More