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

select-all checkmark puts selected items in a reversed order

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.1
    • 8.0.0, 8.6.0.1
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. run the code

          <zscript><![CDATA[
      
              List Items = new ArrayList();
              for (int i = 0; i < 10; i++) {
                  Items.add("data " + i);
              }
              model = new ListModelList(Items);
              model.setMultiple(true);
      
              public void print(){
                  Iterator it = model.getSelection().iterator();
                  while (it.hasNext()){
                      System.out.println(it.next());
                  }
              }
          ]]>
          </zscript>
          <listbox model="${model}" rows="10"
                   onSelect="print()" checkmark="true">
              <listhead>
                  <listheader label="listbox header"/>
              </listhead>
              <template name="model">
                  <listitem label="${each}"/>
              </template>
          </listbox>
      

      2. click the select-all checkmark in the listheader

      Current Result

      it prints

      data 9
      data 8
      ...
      data 0

      Expected Result

      data 0
      ...
      data 8
      data 9

      Debug Information

      • select-all put items in a selection in ascending order under paging mold: mold="paging" pageSize="5". We should make selection order in different molds consistent.

            rudyhuang rudyhuang
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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