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

ListModelList setActivePage doesn't change Grid paging in MVVM pattern

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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