Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364385 - Sort on Price of DojoGrid doesn't work in org.eclipse.edt.rui.dojo.samples_0.7.0
Summary: Sort on Price of DojoGrid doesn't work in org.eclipse.edt.rui.dojo.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 11:54 EST by broy2 CLA
Modified: 2017-02-23 14:15 EST (History)
4 users (show)

See Also:


Attachments
Fix (976 bytes, patch)
2011-11-21 22:17 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 11:54:54 EST
Open dojo.samples.perwidget.DojoGridSample in org.eclipse.edt.rui.dojo.samples_0.7.0.
Preview.
Click Symbol or Shares to sort the column and it sorts.
Click the X or Price to sort and nothing happens.
Comment 1 Brian Svihovec CLA 2011-11-21 11:57:51 EST
This sounds like a duplicate of Bug 364361 - Sort on header of DataGrid doesn't work in org.eclipse.edt.rui.samples_0.7.0.
Comment 2 Jing Qian CLA 2011-11-21 12:03:40 EST
Brenda says this is a regression of EDT, because out of the 4 columns, they all used to be able to sort.  Now only 2 columns are sorted right.
Comment 3 broy2 CLA 2011-11-21 14:01:54 EST
I'd be surprised if the is a duplicate since one is a RUI widget and the other is a Dojo widget.
And in the Dojo widget, 2 of the columns sort and 2 don't.
Comment 4 Huang Ji Yong CLA 2011-11-21 22:17:28 EST
Created attachment 207342 [details]
Fix

Reason:
Pretty the same as 364361
This problem is caused by JavaScript Gen Change.
The data is any[] type in DojoGrid. 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.
I have changed the DojoGrid when making the js change but miss some part of it when adding behavior, so there is error when addEditor behavior was sorted.

Risk:
This fix only affects DojoGrid widget when applying sorting in a editor behavior column.

Customer Impact:
If not fix, DojoGrid cannot be sorted when the column has editor behavior.

Testcase:
The Dojo Sample, Drag & drop a DojoGrid and do the sorting.
Comment 5 Huang Ji Yong CLA 2011-11-22 00:19:36 EST
Change fix to 
egl.unboxAny(eglWidget.data[i])[eglWidget.columns[col].name] = items[i][eglWidget.columns[col].name][0];
Reviewed by Brian. Commit the code
Comment 6 Jing Qian CLA 2011-11-22 10:32:31 EST
JiYong, have you run the regression test against Eunit?  Since this is caused by javascript gen fixes. 

Adding PengFei, please send daily report of Eunit results for java and javascript, to be sure there is no regression
Comment 7 broy2 CLA 2011-11-22 11:52:05 EST
Verified in 20111122 build.