Skip to Content
0
Dec 05, 2013 at 11:00 PM

Cannot read property '0' of undefined

239 Views

Hi

This is the error I get when I try to assign an handler to the button press

fields: [new sap.ui.commons.TextField({value:"A22",editable:false,layoutData:new sap.ui.commons.form.GridElementData({hCells: "2"})}),
            new sap.ui.commons.Button({
            text:"Change",
            press: this.showF4Help,
            layoutData:new sap.ui.commons.form.GridElementData({hCells: "2"})})
            ],

ON press, it should open a dialog box displaying certain items.

The "showF4Help" is defined as a separate method in the view definition which create the layout & UI elements for the dialog.

The function is defined as,
showF4Help: function(oEvent){ 
<something goes here>
}

wF4HelpForTow is definWhat

What could be wrong here?

Regards

Sandip