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

Databinding Load order causing problems on Paging component

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.5.3
    • Fix Version/s: 6.5.4
    • Component/s: Databind 2
    • Security Level: Jimmy

      Description

      <paging pageSize="@load(vm.pageSize)" totalSize="@load(vm.totalSize)" activePage="@bind(vm.activePage)" />
      will cause an error when active page is greater than 0 because its load binding is executed before the load binding to totalSize... so the initialization order is wrong on the paging component.

      Paging.setActivePage() will be called first resulting in an exception like (WrongValueException("Unable to set active page to 2 since only 1 pages")) as the number of pages is calculated from the pageSize and the totalSize which are not yet initialized.

        Activity

        Hide
        dennis dennis added a comment -

        fixed since 2013/8/28

        Show
        dennis dennis added a comment - fixed since 2013/8/28
        Hide
        cor3000 cor3000 added a comment -

        Fix caused sideeffect: setActivePage is no longer called in viewmodel, using activePage="@bind(vm.activePage)" when changing the page via paging arrows

        Show
        cor3000 cor3000 added a comment - Fix caused sideeffect: setActivePage is no longer called in viewmodel, using activePage="@bind(vm.activePage)" when changing the page via paging arrows
        Hide
        dennis dennis added a comment -

        refixed on 2013/9/2

        Show
        dennis dennis added a comment - refixed on 2013/9/2
        Hide
        Senthilchettyin Senthilchettyin added a comment -

        Still getting this error if we put the code in MVVM @AfterCompose event

        Show
        Senthilchettyin Senthilchettyin added a comment - Still getting this error if we put the code in MVVM @AfterCompose event
        Hide
        Senthilchettyin Senthilchettyin added a comment -

        My Use case as follows

        1. A zul page xxxx.zul contains Listbox
        2. User Moves to 3 Page page.
        3. Double click any of the item to open yyyy.zul
        4. yyyy.zul opens in the same container.
        5. in yyyy.zul, we have go back button.
        6. On clicking go back button in yyyy.zul, we need to show the again xxxx.zul and also the listbox should point to 3 page.

        So i try to set the activepage in MVVM @AfterCompose.

        It gives the same error

        Show
        Senthilchettyin Senthilchettyin added a comment - My Use case as follows 1. A zul page xxxx.zul contains Listbox 2. User Moves to 3 Page page. 3. Double click any of the item to open yyyy.zul 4. yyyy.zul opens in the same container. 5. in yyyy.zul, we have go back button. 6. On clicking go back button in yyyy.zul, we need to show the again xxxx.zul and also the listbox should point to 3 page. So i try to set the activepage in MVVM @AfterCompose. It gives the same error
        Hide
        cor3000 cor3000 added a comment -

        Did you try the example attached to this bug? is it not fixed for you with version 6.5.4?
        Otherwise please post a new issue with the reproducing code (ideally a running ZK fiddle example), and state the version you are using.

        Show
        cor3000 cor3000 added a comment - Did you try the example attached to this bug? is it not fixed for you with version 6.5.4? Otherwise please post a new issue with the reproducing code (ideally a running ZK fiddle example), and state the version you are using.
        Hide
        cor3000 cor3000 added a comment -

        closed, as the reopen reason was unrelated to the original bug, the question has been answered in the forum

        Show
        cor3000 cor3000 added a comment - closed, as the reopen reason was unrelated to the original bug, the question has been answered in the forum

          People

          • Assignee:
            Jenkins Jenkins
            Reporter:
            cor3000 cor3000
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: