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

Invalidate on a parent of chosenbox causes selection to disappear using listsubmodel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.2
    • 8.0.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.2 S2

      Select an item, then invalidate.

      Reproduced with:

      <zk>
      	<zscript>
      		ListModelList myModel = new ListModelList(Locale.getAvailableLocales());
      		ListModel mySubModel = ListModels.toListSubModel(myModel);
      	</zscript>
      	<vlayout id="hl">
      		<chosenbox id="myCb" style="min-width:75px;" hflex="1"
      			creatable="true" model="${mySubModel}"
      					onSelect='myLb.setModel(new ListModelList(myModel.getSelection()));' name="chosenboxinput">
      		</chosenbox>
      		<listbox id="myLb"/>
      		<button onClick="hl.invalidate();">Invalidate</button>
      		<button
      			onClick='System.out.println(myModel.getSelection());'>
      			getSelection
      		</button>
      	</vlayout>
      </zk>
      

            DevChu DevChu
            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
                6h