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

ListModelList setActivePage doesn't change Grid paging in MVVM pattern

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.0.1
    • 8.0.0, 9.0.0
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. run the zul below with the attached viewmodel

          <div viewModel="@id('vm')@init('org.zkoss.reference.component.data.PagingVM')" >
              <grid model="@init(vm.model)" mold="paging">
                  <columns>
                      <column label="Locale"/>
                  </columns>
                  <template name="model">
                      <row>
                          ${each}
                      </row>
                  </template>
              </grid>
              <button label="Previous" onClick="@command('previous')"/>
              <button label="Next" onClick="@command('next')"/>
          </div>
      

      2. click next, previous button

      Current Result

      no page switching

      Expected Result

      paging works

      Debug Information

      • model is set in next tick (after evalutated MVVM annotation)
      • _pagingListeners of ListModelList is empty since the model is assigned later than set mold.

      Workaround

      mold="@init('paging')" to delay the sequence

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

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 days
                4d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 2 hours Time Not Required
                3d 2h