Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-12963

Table page gets built twice initially when server side paging is enabled

    Details

    • Type: Bug Fix
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.6
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Rice Team:
      Framework
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      UIF Component
    • Application Requirement:
      KS
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      When server side paging is enabled, data tables will make a request after the page is rendered to get the data for the first page. This means when we render the view on the initial request, we do not want to build out the first page (because it will just get replaced, and this impacts performance). The code to prevent this is in CollectionGroupBuilder:

      // if we are doing server paging, but the display length wasn't set (which will be the case on the page render)
      // then only render one line. Needed to force the table to show up in the page.
      if (collectionGroup.isUseServerPaging() && collectionGroup.getDisplayLength() == -1)

      { collectionGroup.setDisplayLength(1); }

      However, displayLength is being initialized to 10 in the XML so this never gets hit. Instead, we should change this to use the flag available on the form that indicates whether we are processing a paging request:


      // if we are doing server paging, but the display length wasn't set (which will be the case on the page render)
      // then only render one line. Needed to force the table to show up in the page.
      if (collectionGroup.isUseServerPaging() && !form.isCollectionPagingRequest()) { collectionGroup.setDisplayLength(1); }

        Attachments

          Activity

          Hide
          jkneal Jerry Neal (Inactive) added a comment -

          Will help the KS course search

          Show
          jkneal Jerry Neal (Inactive) added a comment - Will help the KS course search

            People

            • Assignee:
              Unassigned
              Reporter:
              jkneal Jerry Neal (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified