Using OpenUI5 / SAPUI5, in the XML Binding Expressions documentation, we have the ability to execute a function from a view.
new sap.m.CheckBox({ selected: "{= checkSelectedItems(${odata>CustomerId}) }" })
In my view controller:
checkSelectedItems: function(sCustomerId) { return true; }
In my opinion, I get a general error, as if she could not find my function:
Uncaught TypeError: Cannot read property 'apply' of undefined
I tried calling the function in several ways:
{= .checkSelectedItems() } {= my.namespace.checkSelectedItems() }
I even tried adding a function to the script tag on my index page to see if it has access only to global functions, but I also could not call it. Suggestions? Am I misinterpreting the documentation?
See JS Bin here: http://jsbin.com/sosotacihi/edit?html,output . I commented on CheckBox which has a problem, but if you put it you will see an error.
mitch source share