-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Listbox : <listbox id="roleListbox" width="98%" checkmark="true" multiple="true" rows="12"/>
The list box is loaded with approximately 50 values using ListModelList(passedList) Requirement is to preselect the values which were saved earlier.
Process: Iterating over roleListbox.getItems() and then checking if the value was selected by getting item.getValue().
But it throws a NullPointerException at item.getValue() for the items which are not yet visible to screen. Paging is NOT being used. If the list is scrolled fully once then NO error is received.
Checked with setPreloadSize(int sz) which is deprecated but doesn't help.
How can I ensure that all items passed in the ListModelList are loaded right away?
you have to render your list fully before you can do that.
Listbox has a method renderAll();
that you need to trigger.
Take attention, this is done at client side so if you do this in the method where you have to preselect the items it will fail.(you need at least 1 interaction with client before it's good)
If you don't find it, show me code and I'll try to figure it out.
Greetz chill.
Asked: 2014-06-28 15:09:41 +0800
Seen: 17 times
Last updated: Jun 28 '14
ZK Listbox Selectitems issue with Set
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
Thanks Chill. Solved the issue. Couldnt upvote your answer as it requires 15 points :).
sarbpreet ( 2014-06-29 12:07:57 +0800 )edit