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

select-all checkmark puts selected items in a reversed order

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.0, 8.6.0.1
    • Fix Version/s: 8.6.1
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      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.

        Attachments

        1. 4162.zul
          0.4 kB
          hawk
        2. MultipleSelectionVM.java
          0.9 kB
          hawk

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

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