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

Chosenbox doesn't send onSelectSubModel direcly to the server 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
    • None

      The onSelectSubModel event is sent with the next AU request, not directly.
      Check the network tab with the following example:

      Reproduce 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='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 - 2 hours
                2h