Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364361 - Sort on header of DataGrid doesn't work in org.eclipse.edt.rui.samples_0.7.0
Summary: Sort on header of DataGrid doesn't work in org.eclipse.edt.rui.samples_0.7.0
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Huang Ji Yong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-21 10:52 EST by broy2 CLA
Modified: 2017-02-23 14:18 EST (History)
3 users (show)

See Also:


Attachments
Fix (1.06 KB, patch)
2011-11-21 21:53 EST, Huang Ji Yong CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description broy2 CLA 2011-11-21 10:52:34 EST
Sort on the header is not working for a DataGrid.
To reproduce, do either of the following:
1. Drop a DataGrid on a RUIHandler, Preview, try to sort column.
2. Open gallery.events.EventDemo in org.eclipse.edt.rui.samples_0.7.0, Preview and click header to sort column.
Comment 1 Lisa Lasher CLA 2011-11-21 11:33:51 EST
Brenda, is this a regression in EDT, do you know?   Was this working in an earlier driver?
Comment 2 Lisa Lasher CLA 2011-11-21 11:35:33 EST
Making this a P1 to indicate that we should look quickly to see what the fix
would be.  If it looks safe, contact Brian to get approval.  Do no commit a fix
without approval.
Comment 3 broy2 CLA 2011-11-21 13:59:30 EST
Yes this is a regression in EDT.  I hadn't been able test in earlier drivers because of a defect that was just recently fixed.
Comment 4 Huang Ji Yong CLA 2011-11-21 21:53:46 EST
Created attachment 207341 [details]
Fix

Reason:
This problem is caused by JavaScript Gen Change.
The sort function of DataGrid is handled by an external js DataGridUtil.
The data is any[] type in DataGrid. The elements in the data array will be boxed to any type while in RBD it is not. So the js of the sort function must add unboxAny to the array element.

Risk:
This fix only affects DataGrid widget.

Customer Impact:
If not fix, DataGrid cannot be sorted.

Testcase:
The RUI Sample whose data type is record array, Drag & Drop a new DataGrid and do sorting whose data type is dictionary array.
Comment 5 Huang Ji Yong CLA 2011-11-22 00:14:54 EST
Reviewed by Brian. Commit the code
Comment 6 broy2 CLA 2011-11-22 11:52:26 EST
Verified in 20111122 build.