Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360613 - DataGrid can NOT be sorted
Summary: DataGrid can NOT be sorted
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Huang Ji Yong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 360929 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-12 02:09 EDT by Yu Hao CLA
Modified: 2017-02-23 14:16 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yu Hao CLA 2011-10-12 02:09:19 EDT
Build Identifier: 201110110900

DnD a DataGrid into a handler, run the handler in preview or deploy, then click the Column Header to sort the column, there will fire an error:
[CRRUI1083E] An error occurred while the click browser event was being handled.
[CRRUI2005E] A null reference cannot be used.
[CRRUI2094E] Here are the EGL function calls leading to this error:


Reproducible: Always
Comment 1 Huang Ji Yong CLA 2011-10-12 02:39:06 EDT
This is a JSGen problem.
The generation for DataGrid.egl clickGrid function line 249 is wrong
The EGL code is
while(widget.class != "EglRuiDataGrid" &&(widget.getAttribute("column") as int) == 0)
            widget = widget.parent;
        end

The generated js is
var eze_compound_1 = false;
			eze_compound_1 = ((egl.checkNull(widget).getClass()) != "EglRuiDataGrid");
			if (eze_compound_1) {
				eze_compound_1 = ((egl.eglx.lang.EInt32.ezeCast(widget.getAttribute("column"),false) == 0));
			}
			while (eze_compound_1) {
				widget = egl.checkNull(widget).getParent();
			}

Here while (eze_compound_1) will always true because it only evaluated once. But actually, when widget changes, the while expression have to be evaluated again.
Comment 2 Huang Ji Yong CLA 2011-10-13 01:22:54 EDT
This defect is caused by the changes made in bug 357820
Comment 3 Huang Ji Yong CLA 2011-10-17 22:25:59 EDT
Resolve by bug 357820
Comment 4 Huang Ji Yong CLA 2011-10-18 02:26:26 EDT
*** Bug 360929 has been marked as a duplicate of this bug. ***
Comment 5 Yu Hao CLA 2011-10-19 23:05:05 EDT
In preview mode. If you click the data items in the data grid. the column will be abnormal.
Comment 6 Huang Ji Yong CLA 2011-10-19 23:21:02 EDT
Comment 5 is another problem opened in bug 360615
Comment 7 Yu Hao CLA 2011-10-19 23:29:45 EDT
Verified in 201110190921