Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-10977

Multi Value Lookup : Implement server side paging for both rich and non rich tables when data selected is not on current page

    Details

    • Type: Task Task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: HTTP Unit Testing
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-5599Multi-Value Lookups: Implement Select/Deselect All Pages
      KULRICE-11936Library - Collections - server side Paging (rich table only) - records displayed, then disappear
      KULRICE-12470KRAD Sampleapp Labs Course Search Rich Table Server Side Paging displays empty result after showing results
      KULRICE-11935Library Collections Lookup sample (server side paging) has no rows returned
      KULRICE-10892Multi Value Return lookup not working when using server paging
      KULRICE-12408Rich Multi-Select/Filter control
      KULRICE-10534Multivalue lookup server side select for server side paging
      KULRICE-9592Design for select/deselect on multi-value lookup
      KULRICE-12314Multi Value select when paging does not work when there are multiple results selected across pages
      KULRICE-7005Implement server paging of collection results
    • Rice Module:
      KRAD
    • Sprint:
      2.4.0-m3 KRAD Sprint 1, 2.4.0-m3 KRAD Sprint 2
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Multi Value Lookup : Implement server side paging for both rich and non rich tables when data selected is not on current page. Four issues need to be handled

      1. With pagination on the lookup results, only selections from the visible page are returned
      2. When server side paging is enabled, selection from the non visible pages are not retained as you move through the pages.
      3. With server side paging and non dataTable rendering "Return Selected" button does not get enabled when clicking on a checkbox.
      4. Getting all the records selected for ‘select all’

        Issue Links

          Activity

          Hide
          Sona Sona (Inactive) added a comment -

          Hi Peter,
          I was able to get MV return along with select all to work for non-datatables with server paging. I had been researching data tables to see how to submit selections when paging and found a solution to it late last night. The problem was that datatables on paging by default do a GET and I wanted to submit the user selections to the next page via POST. Found this related to the issue

          https://datatables.net/forums/discussion/comment/30681

          I will continue working on this today. There are also some javascript issues that I need to work through.

          Jerry: I did not go with a complete client side solution. I took your idea of using selectedCollectionLines and getting it to work with some modifications. I'll setup a review once I get this to work for the cases that were identified.

          Thanks,
          -Sona

          Show
          Sona Sona (Inactive) added a comment - Hi Peter, I was able to get MV return along with select all to work for non-datatables with server paging. I had been researching data tables to see how to submit selections when paging and found a solution to it late last night. The problem was that datatables on paging by default do a GET and I wanted to submit the user selections to the next page via POST. Found this related to the issue https://datatables.net/forums/discussion/comment/30681 I will continue working on this today. There are also some javascript issues that I need to work through. Jerry: I did not go with a complete client side solution. I took your idea of using selectedCollectionLines and getting it to work with some modifications. I'll setup a review once I get this to work for the cases that were identified. Thanks, -Sona
          Hide
          Sona Sona (Inactive) added a comment - - edited

          Hi Jerry and Brian,

          I have multivalue lookup almost working fully now. There are three things I am trying to finish up

          1. Logic for keeping return selected stay active in case of server side paging where content of other pages are not available.

          2. On rich table with no server paging 'select all' is not selecting from hidden pages (have to play around with the datatable library to figure this one out)

          3. On rich table with server paging, I see that the 'select all' makes a call to the controller method and reloads the collection component and that causes the datatable to make a second call because of ajaxSource option. If I set the ajaxReturnType to 'update-none' for select all, the component is removed from the view and subsequent paging requests throw NPE. This is the one I need a little help with. I want to call the controller method on 'select all' but not have the datatable make an unnecessary call back to the server. Any ideas on how this can be done.

          Thanks,
          -Sona

          Hi Sona,

          On number 2 are you saying when the page occurs the items are not selected?

          For 3, I would say the select all should not refresh the collection. This might be an issue with krad.request.js. When update-none is set, it should not look to refresh anything. We have used update-none with Ajax calls that are made from custom script, but maybe not through the action. I would look into making it not refresh when this option is selected.

          Jerry

          Hi Jerry,
          On number 2 Rich table only keeps the visible page content in the DOM, so select all needs to find the hidden (from dom) checkboxes and mark them selected. I am looking into in data table http://datatables.net/plug-ins/api#fnGetHiddenNodes for this issue.

          On number 3. Are you saying it might be a problem with krad.request.js and you would be looking into it or are you suggesting that I should look in that direction? I am sorry I am not very clear about that.

          Thanks,
          -Sona

          Show
          Sona Sona (Inactive) added a comment - - edited Hi Jerry and Brian, I have multivalue lookup almost working fully now. There are three things I am trying to finish up 1. Logic for keeping return selected stay active in case of server side paging where content of other pages are not available. 2. On rich table with no server paging 'select all' is not selecting from hidden pages (have to play around with the datatable library to figure this one out) 3. On rich table with server paging, I see that the 'select all' makes a call to the controller method and reloads the collection component and that causes the datatable to make a second call because of ajaxSource option. If I set the ajaxReturnType to 'update-none' for select all, the component is removed from the view and subsequent paging requests throw NPE. This is the one I need a little help with. I want to call the controller method on 'select all' but not have the datatable make an unnecessary call back to the server. Any ideas on how this can be done. Thanks, -Sona Hi Sona, On number 2 are you saying when the page occurs the items are not selected? For 3, I would say the select all should not refresh the collection. This might be an issue with krad.request.js. When update-none is set, it should not look to refresh anything. We have used update-none with Ajax calls that are made from custom script, but maybe not through the action. I would look into making it not refresh when this option is selected. Jerry Hi Jerry, On number 2 Rich table only keeps the visible page content in the DOM, so select all needs to find the hidden (from dom) checkboxes and mark them selected. I am looking into in data table http://datatables.net/plug-ins/api#fnGetHiddenNodes for this issue. On number 3. Are you saying it might be a problem with krad.request.js and you would be looking into it or are you suggesting that I should look in that direction? I am sorry I am not very clear about that. Thanks, -Sona

            People

            • Assignee:
              Sona Sona (Inactive)
              Reporter:
              Sona Sona (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3 days Original Estimate - 3 days
                3d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days, 1 hour
                4d 1h

                  Agile

                    Structure Helper Panel