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

Multivalue lookup server side select for server side paging

    Details

    • Similar issues:
      KULRICE-10086Continue Server Side Paging Work - Stacked Collection
      KULRICE-10977Multi Value Lookup : Implement server side paging for both rich and non rich tables when data selected is not on current page
      KULRICE-11935Library Collections Lookup sample (server side paging) has no rows returned
      KULRICE-10067Exception on server side page demo
      KULRICE-11945Actions column header disappears with server side paging
      KULRICE-10109Continue Server Side Paging Work - Column/Row Span
      KULRICE-11071KRAD Demo Library Collection Features Server Paging Stacked Collection with server-side paging and Table Collection with server-side Paging not paging
      KULRICE-8109View validation server-side (ViewValidationService) may have problems if fields on other pages have validation issues - untested
      KULRICE-10916Sorting is broken for tables using server side paging
      KULRICE-11936Library - Collections - server side Paging (rich table only) - records displayed, then disappear
    • Rice Module:
      KRAD
    • Sprint:
      2.4.0-m2 KRAD Sprint 3, 2.4.0-m2 KRAD Sprint 4, 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

      Select All/Deselect All needs to be done server side (due to server side paging). Also, need to add records to travel account so we can test server side paging and this functionality

      1. MVDemoCollectionLookup.patch
        22 kB
        Erik Meade
      2. MVHack.patch
        3 kB
        Erik Meade
      1. CollectionLayoutUtils.setControlValueToLineIdentifier-CallStack.png
        103 kB
      2. SelectBuilderHeader.png
        103 kB
      3. SelectBuildLine.png
        97 kB
      4. setExtensionDataCallStack.png
        146 kB

        Issue Links

          Activity

          Hide
          Erik Meade added a comment - - edited

          TableLayoutManager.buildLine(View view, Object model, CollectionGroup collectionGroup, List<Field> lineFields, List<FieldGroup> subCollectionFields, String bindingPath, List<Action> actions, String idSuffix, Object currentLine, int lineIndex) if (collectionGroup.isIncludeLineSelectionField()) might be of importance, perhaps this is where we determine to check the selection in the UI from the server side state.

          RichTable.buildTableOptions(CollectionGroup collectionGroup) if (collectionGroup.isIncludeLineSelectionField()) might be the place for RichTable.

          CollectionLayoutUtils.setControlValueToLineIdentifier might be where if the control as a CheckboxControl we would set the checked state, assuming the checkbox state could be determined from here.

          ComponentUtils.updateContextForLine might be the correct place to set checked state of checkbox.

          Show
          Erik Meade added a comment - - edited TableLayoutManager.buildLine(View view, Object model, CollectionGroup collectionGroup, List<Field> lineFields, List<FieldGroup> subCollectionFields, String bindingPath, List<Action> actions, String idSuffix, Object currentLine, int lineIndex) if (collectionGroup.isIncludeLineSelectionField()) might be of importance, perhaps this is where we determine to check the selection in the UI from the server side state. RichTable.buildTableOptions(CollectionGroup collectionGroup) if (collectionGroup.isIncludeLineSelectionField()) might be the place for RichTable. CollectionLayoutUtils.setControlValueToLineIdentifier might be where if the control as a CheckboxControl we would set the checked state, assuming the checkbox state could be determined from here. ComponentUtils.updateContextForLine might be the correct place to set checked state of checkbox.
          Hide
          Erik Meade added a comment -

          Method stack building the header

          Show
          Erik Meade added a comment - Method stack building the header
          Hide
          Erik Meade added a comment -

          Method stack building line select

          Show
          Erik Meade added a comment - Method stack building line select
          Hide
          Erik Meade added a comment - - edited

          Where to keep the checkbox state maybe in UifFormBase.setExtensionData defined in the interface ViewModel? It looks like one could get the model and the extensionData from it in TableLayoutManager.buildLine and pass it to a modified ComponentUtils.updateContextForLine?

          Show
          Erik Meade added a comment - - edited Where to keep the checkbox state maybe in UifFormBase.setExtensionData defined in the interface ViewModel? It looks like one could get the model and the extensionData from it in TableLayoutManager.buildLine and pass it to a modified ComponentUtils.updateContextForLine?
          Hide
          Erik Meade added a comment -

          From Skype chat with Brian:
          create a view which extends Uif-LookupView
          fill out all the necessary info there
          have the Quickfinder point to it by viewName property
          change the collection to useServerPaging by setting resultsGroup.useServerPaging in this custom view
          see LabsLookupViews for examples

                    <property name="collectionLookup">
                      <bean parent="Uif-CollectionQuickFinder"
                            p:dataObjectClassName="org.kuali.rice.krad.demo.travel.dataobject.TravelAccount"
                            p:fieldConversions="number:field1,name:field2,accountTypeCode:field3"
                            p:viewName="YourCustomViewName"/>
                    </property>
          

          probably dont need to set the dataObjectClassName if you define it in your view
          just the fieldConversions and viewName
          if it doesnt work "ask Jerry"

          Show
          Erik Meade added a comment - From Skype chat with Brian: create a view which extends Uif-LookupView fill out all the necessary info there have the Quickfinder point to it by viewName property change the collection to useServerPaging by setting resultsGroup.useServerPaging in this custom view see LabsLookupViews for examples <property name= "collectionLookup" > <bean parent= "Uif-CollectionQuickFinder" p:dataObjectClassName= "org.kuali.rice.krad.demo.travel.dataobject.TravelAccount" p:fieldConversions= "number:field1,name:field2,accountTypeCode:field3" p:viewName= "YourCustomViewName" /> </property> probably dont need to set the dataObjectClassName if you define it in your view just the fieldConversions and viewName if it doesnt work "ask Jerry"
          Hide
          Erik Meade added a comment -

          Keep KULRICE-10302 in mind once we've got server side paged data getting to the screen.

          Show
          Erik Meade added a comment - Keep KULRICE-10302 in mind once we've got server side paged data getting to the screen.
          Hide
          Erik Meade added a comment -

          Useful info from Sona:
          The Pager widget is used to output a page selection interface for the user to
          select pages. This widget is used by TableLayoutManager when the RichTable option
          is NOT being used and useServerPaging is set to true on the CollectionGroup. This
          widget is also used when a CollectionGroup which uses StackedLayoutManager has its
          useServerPaging property set to true.

          Show
          Erik Meade added a comment - Useful info from Sona: The Pager widget is used to output a page selection interface for the user to select pages. This widget is used by TableLayoutManager when the RichTable option is NOT being used and useServerPaging is set to true on the CollectionGroup. This widget is also used when a CollectionGroup which uses StackedLayoutManager has its useServerPaging property set to true.
          Hide
          Erik Meade added a comment -

          Chat from Jerry:
          My initial thought on this is these will invoke a server side controller method, it would retrieve the collection group to get the select field configuration and the binding path for the collection (like is done for add/delete line and other methods). Then iterate over the entire model and build the keys for each line, and add to the selected keys map on the form. Of course the deselect is easy, it can just clear the selected keys for that collection

          Show
          Erik Meade added a comment - Chat from Jerry: My initial thought on this is these will invoke a server side controller method, it would retrieve the collection group to get the select field configuration and the binding path for the collection (like is done for add/delete line and other methods). Then iterate over the entire model and build the keys for each line, and add to the selected keys map on the form. Of course the deselect is easy, it can just clear the selected keys for that collection
          Hide
          Erik Meade added a comment -

          Hack in forcing server side paging and ignoring errors that prevent screen from displaying.

          Show
          Erik Meade added a comment - Hack in forcing server side paging and ignoring errors that prevent screen from displaying.
          Hide
          Erik Meade added a comment -

          Sona's MV Demo Collection Lookup updates as a patch

          Show
          Erik Meade added a comment - Sona's MV Demo Collection Lookup updates as a patch
          Hide
          Erik Meade added a comment -

          Non-Rich Table Select all on this page:
          Uncaught TypeError: Cannot read property 'nodeName' of undefined
          http://localhost:8080/krad-dev/plugins/datatables/jquery.dataTables.js
          5696
          fnGetPosition
          refreshDatatableCellRedraw is the dataTable the returned results table, it has no cells, undefined node would make sense if that is the case. The lookup results table is class="table table-condensed table-bordered uif-tableCollectionLayout"
          setMultivalueLookupReturnButton commented out refresh call to see what happens.
          Uncaught TypeError: Cannot call method 'fnGetData' of null
          http://localhost:8080/krad-dev/krad/scripts/krad.utility.js
          2545
          getDataTablesColumnData another case of working on the empty results table? commenting it out doesn't break anything on the lookup results table

          Non-Rich Table Select all:
          Uncaught TypeError: Cannot call method 'fnGetNodes' of null
          http://localhost:8080/krad-dev/krad/scripts/krad.widget.js
          1022
          selectAllPagesLines getDataTableHandle returns null as the collection id is on the return results table (uLookupResults)

          Show
          Erik Meade added a comment - Non-Rich Table Select all on this page: Uncaught TypeError: Cannot read property 'nodeName' of undefined http://localhost:8080/krad-dev/plugins/datatables/jquery.dataTables.js 5696 fnGetPosition refreshDatatableCellRedraw is the dataTable the returned results table, it has no cells, undefined node would make sense if that is the case. The lookup results table is class="table table-condensed table-bordered uif-tableCollectionLayout" setMultivalueLookupReturnButton commented out refresh call to see what happens. Uncaught TypeError: Cannot call method 'fnGetData' of null http://localhost:8080/krad-dev/krad/scripts/krad.utility.js 2545 getDataTablesColumnData another case of working on the empty results table? commenting it out doesn't break anything on the lookup results table Non-Rich Table Select all: Uncaught TypeError: Cannot call method 'fnGetNodes' of null http://localhost:8080/krad-dev/krad/scripts/krad.widget.js 1022 selectAllPagesLines getDataTableHandle returns null as the collection id is on the return results table (uLookupResults)
          Hide
          Sona Sona (Inactive) added a comment -

          Hi Eric, I saw that too earlier and had discussed with the team if we would be supporting only datatables which was not the case. We need support for both. Also MV select and select all are both dependent on each other. So, the solution that we come up with should work for both. Please look at my email thread regarding the MVL analysis. The relates jiras are KULRICE-10302 and KULRICE-10892. Thanks

          Show
          Sona Sona (Inactive) added a comment - Hi Eric, I saw that too earlier and had discussed with the team if we would be supporting only datatables which was not the case. We need support for both. Also MV select and select all are both dependent on each other. So, the solution that we come up with should work for both. Please look at my email thread regarding the MVL analysis. The relates jiras are KULRICE-10302 and KULRICE-10892 . Thanks
          Hide
          Adam Campbell (Inactive) added a comment -

          QA validation pending checkin

          Show
          Adam Campbell (Inactive) added a comment - QA validation pending checkin
          Hide
          Erik Meade added a comment -

          A bulk of the work is done, a few screens need updates for the collection to be returned to, Jiras have been written and linked to this task.

          Show
          Erik Meade added a comment - A bulk of the work is done, a few screens need updates for the collection to be returned to, Jiras have been written and linked to this task.

            People

            • Assignee:
              Erik Meade
              Reporter:
              Erik Meade
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 days Original Estimate - 2 days
                2d
                Remaining:
                Time Spent - 1 week, 4 days, 5 hours, 51 minutes Remaining Estimate - 1 day, 6 hours
                1d 6h
                Logged:
                Time Spent - 1 week, 4 days, 5 hours, 51 minutes Remaining Estimate - 1 day, 6 hours
                1w 4d 5h 51m

                  Agile

                    Structure Helper Panel