-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Before doBeforeComposeChildren
... there's nothing rendered yet so you can't select a listitem at this point.
onSelect$rsListBox
is an event listener which also will only trigger if a component receives an event. If not yet rendered there won't be an event.
Said that, the thing you might have to look into is model-based rendering (either by template or item renderer). i.e. you populate the data and selected object(s) before the rendering happens.
here an example http://zkfiddle.org/sample/3ajgh1d/1-listbox-with-model-and-initial-selection
2 | No.2 Revision |
Before doBeforeComposeChildren
... there's nothing rendered yet so you can't select a listitem at this point.
onSelect$rsListBox
is an event listener which also will only trigger if a component receives an event. If not yet rendered there won't be an event.
Said that, the thing think you might have to look into is model-based rendering (either by template or item renderer).
i.e. you populate the data and selected object(s) before the rendering happens.
here an example http://zkfiddle.org/sample/3ajgh1d/1-listbox-with-model-and-initial-selection