Show TOC

init() MethodLocate this document in the navigation structure

The init() method can be used to set up, for example, internal variables or subcontrols of a composite control.

If the init() method is implemented, SAPUI5 invokes the method for each control instance directly after the constructor method.

Note

Values that are given in the constructor method are not yet available in the init method. This is to prevent that a control only works when the values are set initially, but not when the values are changed.

The init method is considered a private method that must only be called by the SAPUI5 core.

   init: function() {

      this._bSearchHasBeenTriggered = false;

      this._oSearchButton = new sap.ui.commons.Button(this.getId() + "-searchBtn", {text: "Search"});

   }