-
FEATURED COMPONENTS
First time here? Check out the FAQ!
For details question you can check this link http://stackoverflow.com/questions/23076867/java-set-not-adding-object-when-selecting-items-from-listbox
Hello sjoshi,
First of all you should not have any issues by using a Set, but in general using a list is most commonly used.
Furthermore, you have to update your model and your listbox each time you add an item as shown below:
@GlobalCommand
@NotifyChange({"model", "list"})
public void populateList() {
model = new ListModelList<>();
model.addAll(updatedList);
}
Finally if you want to assign one selected item, then the following code is wrong:
private Set selectedListItem;
rather it should be the model type.
For more information please refer to the following url:
Best Regards,
Darksu
Asked: 2014-04-15 10:49:15 +0800
Seen: 21 times
Last updated: Aug 19 '14
How to stop a bug from a listbox?
Cannot Change Listbox Header color & Background
Keyboard navigation in listbox
Can not display data in listbox
listbox with nonSelectabletags inplace new listitem
Input invoice using inline listbox
Change color to hover listitem listbox zk7 + Atlantic Theme
Listbox with autopaging causes constant row flickering
zk listbox getItems() returns null for item.getValue() if not scrolled fully