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

Bandpopup width does not change (adapt itself) with listbox dynamic content.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Normal Normal
    • None
    • 6.0.1, Freshly
    • Components
    • ZK 6.0.1-FL CE (build: 2012042716), IE8, Firefox 5.0, Java JDK 1.0.6_18

      I use a listbox inside a bandpopup with the following code:

      <bandbox id="shiftGroupManagerBandBox"
      readonly="true"
      mold="rounded"
      >
      <bandpopup hflex="min">
      <listbox id="shiftGroupManagerListBox"
      multiple="true"
      checkmark="true"
      rows="0"
      hflex="min"
      />
      </bandpopup>
      </bandbox>

      The first time I fill listitems with java:

      @Override
      public void doAfterCompose(Component comp) throws Exception {
      super.doAfterCompose(comp);
      ...
      ...
      shiftGroupManagerList = shiftGroupManagerService.findAllShiftGroupManager();
      for (ShiftGroupManager shiftGroupManagerEntry : shiftGroupManagerList)

      { Listitem li = new Listitem(); li.setValue(shiftGroupManagerEntry.getShiftGroupManagerId().toString()); li.setLabel(shiftGroupManagerEntry.getShiftGroupManagerLastName()); shiftGroupManagerListBox.appendChild(li); }

      ...
      ...
      }

      bandpopup define its width correctly.
      But if i remove all shiftGroupManagerListBox children with:

      shiftGroupManagerListBox.getChildren().clear();

      and then if I fill again shiftGroupManagerListBox with different listitems, a horizontal scrollbar appears on bandpopup, maybe because one or more new listitems are wider than the ones I cleared before.
      It seems like bandpopup width be setup only the first time but then no.

        1. With_scrollbar.png
          6 kB
          sboscolo
        2. zero_width_listbox.png
          3 kB
          sboscolo

            jumperchen jumperchen
            sboscolo sboscolo
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: