The SAPUI5 Developer Guide for SAP HANA (SPS 10) explains in "1.2.2.3.2 Add a Control to Your View" how to add a Listener to a Button (JS View):
var aControls = [];
var oButton = new sap.ui.commons.Button({
id : this.createId("MyButton"),
text : "Hello JS View"
});
aControls.push(oButton.attachPress(oController.doIt));
return aControls;
And how to implement the controller:
doIt : function(oEvent) { alert(oEvent.getSource().getId() + " does it!"); }
Unfortunately the code is not working in our system (SAP HANA SPS 09)
Which is the correct Code using MVC (not model, view, controll in one file)?
Where can I get correct developer information?