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

Bandpopup content Listbox with hflex="min" get a 1px width if Listbox is updated while popup is not visible

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 7.0.7, 8.0.1
    • 7.0.7, 8.0.1
    • None
    • Security Level: Jean
    • None
    • ZK 7.0.7

      When a bandpopup contains a listbox with hflex min.
      If the Listbox model is updated while the bandpopup is not visible, the Listbox gets a width of 1px.
      It does not update again when the popup becomes visible, which cause the bandpopup to appear empty.

      Step to reproduce:
      1 - With the following code, click on the bandbox search button to open the popup.
      2 - close the popup
      3 - change the listbox model by clicking on the "change model" button
      4 - click on the bandbox search button to open the popup.
      > the listbox has been shrinked to 1px

      Note : this does not happen if the bandpopup use a grid instead.

      Code to reproduce:

      <zk>
      	<window>
      	<zscript>
      		ListModelList myModel = new ListModelList(Locale.getAvailableLocales());
      		ListModelList getMyModel(){
      		return myModel;
      		}
      		void handleButtonClick(){
      			List myList = new ArrayList();
      			myList.add("test1");
      			myList.add("test2");
      			myList.add("test3");
      			myModel = new ListModelList(myList);
      			mylistbox.setModel(myModel);
      		}
      	</zscript>
      		<bandbox>
      			<bandpopup hflex="min">
      					<listbox id="mylistbox"
      						height="250px"
      						model="${myModel}"
      						hflex="min">
      					</listbox>
      			</bandpopup>
      		</bandbox>
      		<button label="change model" onClick="handleButtonClick()"/>
      	</window>
      </zk>
      

            christopherszu christopherszu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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