[KULRICE-10916] Sorting is broken for tables using server side paging Created: 09/Oct/13 Updated: 23/Mar/14 Resolved: 14/Oct/13
|Project:||Kuali Rice Development|
|Security Level:||Public (Public: Anyone can view)|
|Reporter:||Peter Giles (Inactive)||Assignee:||Mark Fyffe (Inactive)|
|Remaining Estimate:||1 day|
|Time Spent:||4 hours|
|Original Estimate:||1 day, 4 hours|
|KRAD Feature Area:||
|Sprint:||2.4.0-m2 KRAD Sprint 4|
|KAI Review Status:||Not Required|
|KTI Review Status:||Not Required|
|Code Review Status:||Not Required|
|Include in Release Notes?:||
Sorting is broken when server paging is enabled. To reproduce in the KRAD sample app:
You'll get a JS alert similar to "DataTables warning (table id = 'u100101'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error."
In the server log you'll get a stack trace:
|Comment by Peter Giles (Inactive) [ 11/Oct/13 ]|
Hi Mark, the sort for server paging broke somewhere in this cluster of commits last friday: r41980, r41981, r41982. The MultiColumnComparator is (on line 406) copying components for use as prototypes, and this is happening when the view state is not active. I'm not sure why it's forbidden to copy components at that time. Can you please take a look? Thanks
|Comment by Mark Fyffe (Inactive) [ 11/Oct/13 ]|
Hi Peter - I'll look into this over the weekend. It should be relatively straightforward to address. I'll follow up with details tomorrow or Sunday.
|Comment by Mark Fyffe (Inactive) [ 14/Oct/13 ]|
Committed a fix.
Since MultiColumnComparator creates copies of selected components from the posted view, it needs to be encapsulated in a lifecycle or initialization call to enable modification. Since the sorting isn't really part of the lifecycle, I wrapped the MultiColumnComparator constructor in an encapsulateInitialization call() and am no longer seeing this issue.
|Comment by Adam Campbell (Inactive) [ 21/Oct/13 ]|
validated on env14