Steps to Reproduce
run the fiddle, click the [create] button
https://zkfiddle.org/sample/opq7sg/1-adding-listbox-with-item-renderer-in-posted-eventlistener
Current Result
the listbox renders without any listitems
Expected Result
3 listitems rendered "aaa", "bbb", "ccc"
Debug Information
the issue happens specifically when setting the model and itemRenderer in an event listener for a custom event triggered via postEvent from doAfterCompose of a composer instance
the zkau response doesn't contain the listitems.
at server side the listbox dataloader implements a Cropper that returns no items to be rendered in this scenario
Workaround
- don't use an ListItemRenderer,
- call setItemRenderer before setModel
- detach/re-attach the listbox before setting the model/itemrenderer
- relates to
-
ZK-4517 Listheader update issues with invalidatePartial
- Closed