Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4970

listbox renders empty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 9.6.1
    • Freshly, 9.5.1.3, 9.6.0
    • Components
    • Security Level: Jimmy
    • still works in 9.5.0.3

      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

      1. don't use an ListItemRenderer,
      2. call setItemRenderer before setModel
      3. detach/re-attach the listbox before setting the model/itemrenderer

            jumperchen jumperchen
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h