OFBiz
  1. OFBiz
  2. OFBIZ-1935

Allow multi-pagination in a page

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Trunk
    • Fix Version/s: Trunk
    • Component/s: ALL COMPONENTS
    • Labels:
      None

      Description

      If a page has more than one paginations (fe : view profile has one in "Financial Account Summary " and one in "Shipper Account" ) the pagination numbers become wrong, as both paginations use VIEW_SIZE and VIEW_INDEX parameters from the request.

      1. 1935.diff
        17 kB
        Jacques Le Roux
      2. 1935.diff
        15 kB
        Bilgin Ibryam

        Issue Links

          Activity

          Hide
          Bilgin Ibryam added a comment -

          The attached patch will add paginator numbers to VIEW_SIZE and VIEW_INDEX parameters, so every form has different parameters for pagination (form one will use VIEW_SIZE_1, VIEW_INDEX_1, second form on the same page will use VIEW_SIZE_2, VIEW_INDEX_2 params....).
          The last paginator number used on a page is stored in globalContext, so every rendered pagination can get next number to use for the parameters.

          Also fixed a bug, where iterator-section was not adding existing request parameters to the paginator links.

          Any tests and reviews would be appreciated.
          Bilgin

          Show
          Bilgin Ibryam added a comment - The attached patch will add paginator numbers to VIEW_SIZE and VIEW_INDEX parameters, so every form has different parameters for pagination (form one will use VIEW_SIZE_1, VIEW_INDEX_1, second form on the same page will use VIEW_SIZE_2, VIEW_INDEX_2 params....). The last paginator number used on a page is stored in globalContext, so every rendered pagination can get next number to use for the parameters. Also fixed a bug, where iterator-section was not adding existing request parameters to the paginator links. Any tests and reviews would be appreciated. Bilgin
          Hide
          Jacques Le Roux added a comment -

          Hi BIlgin,

          I reviewed and tested your patch, for me all is ok. I just added a pagination to ListCarrierAccounts and made it comes back to viewprofile. Doing so I tried to use the paginate-target-anchor tag to come back to the right position in the page. But I did not find how to use it. I guess it's not implemented for now. I will have a look later and will open a new issue if needed.

          Patch attached

          Show
          Jacques Le Roux added a comment - Hi BIlgin, I reviewed and tested your patch, for me all is ok. I just added a pagination to ListCarrierAccounts and made it comes back to viewprofile. Doing so I tried to use the paginate-target-anchor tag to come back to the right position in the page. But I did not find how to use it. I guess it's not implemented for now. I will have a look later and will open a new issue if needed. Patch attached
          Hide
          Bilgin Ibryam added a comment -

          Jacques,

          thanks for testing the patch.
          In paginate-target-anchor you have to specify a link name, but pagination links don't have names.
          You can use also formId, like this: paginate-target-anchor="ListCarrierAccounts" and the page will be scrolled.

          Show
          Bilgin Ibryam added a comment - Jacques, thanks for testing the patch. In paginate-target-anchor you have to specify a link name, but pagination links don't have names. You can use also formId, like this: paginate-target-anchor="ListCarrierAccounts" and the page will be scrolled.
          Hide
          Jacques Le Roux added a comment -

          Thanks for the tip Bilgin

          Show
          Jacques Le Roux added a comment - Thanks for the tip Bilgin
          Hide
          Jacques Le Roux added a comment -

          Thanks Bilgin,

          Your (slightly modifiedf) patch is in trunk revision: 725053 .

          It's cool to be able to get back to page position using paginate-target-anchor and corresponding form name. I quickly look to see if something like that also exists for forms like EditCarrierAccount (with no pagination) but did not find anything. It would be cool to come back to the place where you made a change instead of top of page. So we might consider introduce an anchor attribute except it already exists and I missed it.

          Show
          Jacques Le Roux added a comment - Thanks Bilgin, Your (slightly modifiedf) patch is in trunk revision: 725053 . It's cool to be able to get back to page position using paginate-target-anchor and corresponding form name. I quickly look to see if something like that also exists for forms like EditCarrierAccount (with no pagination) but did not find anything. It would be cool to come back to the place where you made a change instead of top of page. So we might consider introduce an anchor attribute except it already exists and I missed it.
          Hide
          Bruno Busco added a comment -

          There is still a wrong behaviour of the pagination when used in Ajax forms.
          Please see https://issues.apache.org/jira/browse/OFBIZ-3083 for further details.

          Show
          Bruno Busco added a comment - There is still a wrong behaviour of the pagination when used in Ajax forms. Please see https://issues.apache.org/jira/browse/OFBIZ-3083 for further details.
          Hide
          Bilgin Ibryam added a comment -

          In r885709 I did a fix, which should cover most of the ajax forms in the project.

          The bug will continues to appear, when there are more than one list or multi forms in a page using ajax pagination. This happens because for the ajax response, the form is rendered alone, in a separate screen where it always gets index 1.

          Show
          Bilgin Ibryam added a comment - In r885709 I did a fix, which should cover most of the ajax forms in the project. The bug will continues to appear, when there are more than one list or multi forms in a page using ajax pagination. This happens because for the ajax response, the form is rendered alone, in a separate screen where it always gets index 1.

            People

            • Assignee:
              Unassigned
              Reporter:
              Jacques Le Roux
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development