Coding the View-Controller Files

You perform this procedure as a prerequisite to creating an extension in SAP Asset Strategy and Performance Management.

Procedure

  1. Create a UI5 view for the extension.
  2. To create a UI5 controller, follow these substeps:
    1. Use the same name in the controller as you specified in the view file.
    2. Ensure that the controller inherits an ExtensionBaseController. You can achieve this by following this example:
      This enables your controller to access the following using controller instance variables:
      • The Object Page Controller (this._oParentController)

      • The Router of the application (this._oRouter)

      • The Event Bus (this._oEventBus)

      • The Object Page (this._ oObjectPage)

      • Application Component (this. _oComponent)

  3. You can add event handlers and other required methods as per standards and conventions of UI5/openUI5.{ id:32-char Id, status: statusCode //("1" - Unpublished, "2" - Published, "3" - In revision), version: versionNumber }
  4. To ensure that the added functionality works fine, wrap each function in a try-catch block. An example is shown here:
  5. Make service calls in your custom sections through the AIN services. Use the following method to make the service call:

Results

You have the coded View-Controller files.