on 04-12-2016 7:02 AM
Hi,
I have this code:
var oItem = new sap.m.ObjectListItem({
id: "mainListItem",
//press: "onSelectionChange",
press: function(oEvent){
this.onSelectionChange(oEvent);
},
type: "Active",
title: "{Description}",
number: "{Activity}",
});
But de application displays this error:
Master.controller.js:47 Uncaught TypeError: this.onSelectionChange is not a function
I used the code press: "onSelectionChange",but display this error:
sap-ui-core.js:143 Uncaught TypeError: I.fFunction.call is not a function
The onSelectionChange method exits in the View controller (BaseController). The application is a template of SAP Fiori Master / Detail 1.28.
Best regards,
Johnny
Hi Johnny,
before your initialize your Item, try:
self = this;
and than IN your initialize:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jonny,
Where you have written this code?
the declaration part of columnlistitem is written in View or Controller?
Regards,
Vikash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
move press function logic to controller like press: [ oController.handlePress , oController ] ,
or
try changing this.onSelectionChange(oEvent); to this.getController().onSelectionChange(oEvent);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.