Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364361

Summary: Sort on header of DataGrid doesn't work in org.eclipse.edt.rui.samples_0.7.0
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Huang Ji Yong <hjiyong>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: chenzhh, jqian, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Fix none

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.