on 02-07-2014 11:20 AM
Hello Experts,
I created a simple list with this code in javascript view:
<<
var list = new sap.m.List({
headerText: "MENU'",
items: [
new sap.m.ActionListItem({
text: "Inserisci Estratto Conto",
press: "ADD_EC"
}),
new sap.m.ActionListItem({
text: "Rendiconto",
press : function () {
sap.m.URLHelper.triggerEmail(person.email, "Info", "Dear " + person.name + ",");
}
}),
]
});
>>
The second "sap.m.ActionListItem" is ok, but the first doesn't call the function "ADD_EC", that I implemented in the corresponding controller:
<<
ADD_EC : function(oEvent) {
alert(oEvent.getSource().getId() + " does it!");
},
>>
In debug I have this error "Uncaught TypeError: Object D has no method 'call'".
Help me, Please!!
Thanks in advance.
Best Regards,
Marino
Hi,
You need to pass controller when you define press function. More details you can find here: SAPUI5 SDK - Demo Kit
Please also find working code here: http://jsbin.com/siba/1/edit?html,output
Regards,
Vlad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys,
thanks so much.
I solved the problem.
Thanks again.
Best Regards,
Marino
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marino,
Write controllername.functionname without "
Hope this helps,
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.