Professional Documents
Culture Documents
91f0a8dc6f4d1014b6dd926db0e91070
view on: demo kit nightly build | demo kit latest release
The following method names have a specific meaning and should be used accordingly:
• on...: Used for event handlers that are automatically bound to browser events
• init: Used for the initialization function that is called after control instantiation
• renderer: Used for the function that creates the control’s HTML
Note: Any method in your inheriting control overrides methods with the same name in the superclass. If, for
example, your control implements the init() method, the init() of the superclass will no longer be
executed. The control is then no longer properly initialized and this typically causes an error. To avoid breaking the
control, call the superclass method.
Consider also that the superclass might implement the method later on, or removes its own method
implementation because it is not needed anymore. We recommend that you check for the existence of the
superclass method before calling it:
sap.ui.somelib.SomeControl.extend("my.OwnControl", {
...
init: function() {
if (sap.ui.somelib.SomeControl.prototype.init) { // check
whether superclass implements the method
sap.ui.somelib.SomeControl.prototype.init.apply(this,
arguments); // call the method with the original arguments
}