Uploaded image for project: '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
    • Status: Closed
    • Priority: 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
    • 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’

        Attachments

          Issue Links

            Activity

            Hide
            sonam 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
            sonam 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
            sonam 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
            sonam 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:
                sonam Sona Sona (Inactive)
                Reporter:
                sonam 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