Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363734 - RUI Datagrid selectionListeners not returning selected row
Summary: RUI Datagrid selectionListeners not returning selected row
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Huang Ji Yong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-14 13:36 EST by Paul Hoffman CLA
Modified: 2017-02-23 14:15 EST (History)
1 user (show)

See Also:


Attachments
Zipped RUI application projects (282.32 KB, application/x-zip-compressed)
2011-11-14 13:36 EST, Paul Hoffman CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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