[KULRICE-10534] Multivalue lookup server side select for server side paging Created: 13/Sep/13  Updated: 21/Apr/14  Resolved: 30/Oct/13

Status: Closed
Project: Kuali Rice Development
Component/s: Development, KNS Equivalency, User Experience (UX)
Affects Version/s: 2.4
Fix Version/s: 2.4
Security Level: Public (Public: Anyone can view)

Type: Task Priority: Critical
Reporter: Erik Meade Assignee: Erik Meade
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 1 day, 6 hours
Time Spent: 1 week, 4 days, 5 hours, 51 minutes
Original Estimate: 2 days

Attachments: PNG File CollectionLayoutUtils.setControlValueToLineIdentifier-CallStack.png     Text File MVDemoCollectionLookup.patch     Text File MVHack.patch     PNG File SelectBuildLine.png     PNG File SelectBuilderHeader.png     PNG File setExtensionDataCallStack.png    
Issue Links:
Relate
relates to KULRICE-11161 KRAD Labs Lookup Multiple Values Retu... Closed
relates to KULRICE-11163 KRAD Demo Account Multi-Value Lookup ... Closed
relates to KULRICE-11164 KRAD Labs MV links have no collection... Closed
is related to KULRICE-10892 Multi Value Return lookup not working... Closed
is related to KULRICE-10680 Apply 2013-09-21.sql and mysql-2013-0... Closed
is related to KULRICE-10119 Update Multi Value Lookups Selection ... Closed
is related to KULRICE-10302 Analysis - Results not on the current... Closed
Rely
relies on KULRICE-10680 Apply 2013-09-21.sql and mysql-2013-0... Closed
relies on KULRICE-10977 Multi Value Lookup : Implement server... Closed
is relied upon by KULRICE-10302 Analysis - Results not on the current... Closed
Epic Link: Lookup Equivalence
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



 Comments   
Comment by Erik Meade [ 23/Sep/13 ]

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.

Comment by Erik Meade [ 23/Sep/13 ]

Method stack building the header

Comment by Erik Meade [ 23/Sep/13 ]

Method stack building line select

Comment by Erik Meade [ 23/Sep/13 ]

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?

Comment by Erik Meade [ 02/Oct/13 ]

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"

Comment by Erik Meade [ 03/Oct/13 ]

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

Comment by Erik Meade [ 03/Oct/13 ]

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.

Comment by Erik Meade [ 03/Oct/13 ]

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

Comment by Erik Meade [ 10/Oct/13 ]

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

Comment by Erik Meade [ 13/Oct/13 ]

Sona's MV Demo Collection Lookup updates as a patch

Comment by Erik Meade [ 13/Oct/13 ]

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)

Comment by Sona Sona (Inactive) [ 14/Oct/13 ]

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

Comment by Adam Campbell (Inactive) [ 14/Oct/13 ]

QA validation pending checkin

Comment by Erik Meade [ 30/Oct/13 ]

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.

Generated at Tue Jan 26 13:29:08 CST 2021 using JIRA 7.0.11#70121-sha1:19d24976997c1d95f06f3e327e087be0b71f28d4.