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

listbox renders empty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Freshly, 9.5.1.3, 9.6.0
    • Fix Version/s: 9.6.1
    • Component/s: Components
    • Security Level: Jimmy
    • Environment:

      still works in 9.5.0.3

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

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