Skip to Content
0
Former Member
Aug 13, 2015 at 09:33 AM

How to override prototype method of a control

648 Views

Hi experts,

Suppose for example,i am using sap.m.Button it already have an event

Button.prototype.ontouchstart = function(oEvent) {

// mark the event for components that needs to know if the event was handled by the button

oEvent.setMarked();

// change the source only when the first finger is on the control, the

// following fingers doesn't affect

if (oEvent.targetTouches.length === 1) {

// set active button state

this._activeButton();

// set target which started the event

this._target = oEvent.target;

}

};

If i want to add any new logic of mine inside this function . what should be my approach. I am new to ui5 please help. Dennis Seah's Profile | SCN kindly help.