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

Bug 363734

Summary: RUI Datagrid selectionListeners not returning selected row
Product: z_Archived Reporter: Paul Hoffman <hoffmanp>
Component: EDTAssignee: Huang Ji Yong <hjiyong>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: hjiyong
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Zipped RUI application projects none

Description Paul Hoffman CLA 2011-11-14 13:36:08 EST
Created attachment 206970 [details]
Zipped RUI application projects

Import projects from attached zip file.

Run RUI handler PaymentFileMaintenance.

Select (click on) utilities row in datagrid.

WriteStdOut trace for Rui shows cellClicked event triggered:

Event: cellClicked
Payment: null 
[CRRUI1083E] An error occurred while the click browser event was being handled.
[CRRUI2002E] 'this.eze$$parent.selectedPayment.description' is null or not an object
An error occurred inside retrieveModelHelper this.selectedPayment.description: publish
[CRRUI2094E] Here are the EGL function calls leading to this error:

    org/eclipse/edt/rui/mvc/MVCLib.egl() at line 22
    org/eclipse/edt/rui/mvc/Controller.egl() at line 86
    org/eclipse/edt/rui/mvc/FormManager.egl() at line 48
    handlers/PaymentFileMaintenance.egl() at line 312
    org/eclipse/edt/rui/widgets/DataGrid.egl() at line 993
    org/eclipse/edt/rui/widgets/DataGrid.egl() at line 982

cellClicked function should set selectedPayment using getSelection function, but  trace shows selectedPayment is null.    Here is cellclicked function.

    function cellClicked(myGrid DataGrid in)
      selectedPayment = allPayments_ui.getSelection()[1] as paymentRec;
      logPaymentEvent ( "cellClicked", selectedPayment ) ;
      selectedPayment_form.publish();
      selectedPayment_category_comboBox.value = 
         PaymentLib.getCategoryDesc(selectedPayment.category);
   end
Comment 1 Huang Ji Yong CLA 2011-11-15 21:00:49 EST
This problem happens when accessing data in an any array field when the array literal is not explicitly converted to any type array. 
Such case may be common when using DataGrid, so change the severity to P1
Comment 2 Huang Ji Yong CLA 2011-11-16 20:08:39 EST
Change ArrayLiteralTemplated. Fixed yesterday.
Comment 3 Paul Hoffman CLA 2012-03-30 16:08:40 EDT
Issue Fixed