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: None
    • Component/s: ALL COMPONENTS
    • Labels:
      None
    • Sprint:
      Bug Crush Event - 21/2/2015

      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

          Jacques Le Roux created issue -
          Jacques Le Roux made changes -
          Field Original Value New Value
          Link This issue is related to OFBIZ-1932 [ OFBIZ-1932 ]
          Bilgin Ibryam made changes -
          Assignee Bilgin Ibryam [ bibryam ]
          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
          Bilgin Ibryam made changes -
          Attachment 1935.diff [ 12394826 ]
          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
          Jacques Le Roux made changes -
          Attachment 1935.diff [ 12394927 ]
          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.
          Jacques Le Roux made changes -
          Fix Version/s SVN trunk [ 12311928 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          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.
          Bruno Busco made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          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.
          Gavin made changes -
          Workflow jira [ 12440892 ] OFbiz Workflow [ 12505601 ]
          Jacopo Cappellato made changes -
          Assignee Bilgin Ibryam [ bibryam ]
          Jacopo Cappellato made changes -
          Fix Version/s Trunk [ 12311928 ]
          Sharan Foga made changes -
          Sprint Bug Crush Event - 21/2/2015 [ 91 ]
          Sharan Foga made changes -
          Rank Ranked higher
          Sharan Foga made changes -
          Rank Ranked higher
          Sharan Foga made changes -
          Rank Ranked higher
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          104d 13h 59m 1 Jacques Le Roux 10/Dec/08 10:43
          Closed Closed Reopened Reopened
          325d 23h 23m 1 Bruno Busco 01/Nov/09 10:06

            People

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

              Dates

              • Created:
                Updated:

                Development

                  Agile