Skip to Content
avatar image
Former Member

How do you resolve Uncaught Error 'setValue' of undefined

handleEditCafeItemMasterPress: function () { this._toggleButtonsCafeItem(true); var getCafeItemEditDesc = sap.ui.getCore().byId("editCafeItemName"); var getCafeItemEditCode = sap.ui.getCore().byId("editCafeItemCode"); var getCafeItemName = this.getView() .byId("setItemName") .getText(); var getCafeItmCode = this.getView() .byId("setItemCode") .getText(); getCafeItemEditDesc.setValue(getCafeItemName); getCafeItemEditCode.setValue(getCafeItmCode); },

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 08 at 09:21 AM

    getCafeItemEditDesc = sap.ui.getCore().byId("editCafeItemName");

    Is this "sap.m.Text" or "sap.m.Label" ?

    If it is text then use "setText()" instead of "setValue()".

    Add comment
    10|10000 characters needed characters exceeded