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

Multivalue lookup server side select for server side paging

    Details

    • 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

        Attachments

          Issue Links

            Activity

            Hide
            eghm-kuali-m 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
            eghm-kuali-m 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
            eghm-kuali-m Erik Meade added a comment -

            Method stack building the header

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

            Method stack building line select

            Show
            eghm-kuali-m Erik Meade added a comment - Method stack building line select
            Hide
            eghm-kuali-m 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
            eghm-kuali-m 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
            eghm-kuali-m 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
            eghm-kuali-m 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
            eghm-kuali-m Erik Meade added a comment -

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

            Show
            eghm-kuali-m Erik Meade added a comment - Keep KULRICE-10302 in mind once we've got server side paged data getting to the screen.
            Hide
            eghm-kuali-m 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
            eghm-kuali-m 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
            eghm-kuali-m 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
            eghm-kuali-m 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
            eghm-kuali-m Erik Meade added a comment -

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

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

            Sona's MV Demo Collection Lookup updates as a patch

            Show
            eghm-kuali-m Erik Meade added a comment - Sona's MV Demo Collection Lookup updates as a patch
            Hide
            eghm-kuali-m 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
            eghm-kuali-m 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
            sonam 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
            sonam 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
            acampbell Adam Campbell (Inactive) added a comment -

            QA validation pending checkin

            Show
            acampbell Adam Campbell (Inactive) added a comment - QA validation pending checkin
            Hide
            eghm-kuali-m 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
            eghm-kuali-m 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:
                eghm-kuali-m Erik Meade
                Reporter:
                eghm-kuali-m 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