Show TOC

Use JavaScript and XML TemplatesLocate this document in the navigation structure

You can add SAPUI5 control-specific templates for JavaScript code. Such templates are available, for example, in JavaScript views of SAPUI5 application tools development.

Context

SAPUI5 provides the possibility to add SAPUI5 control specific templates for JavaScript and XML code. These templates are available, for example, in JavaScript and XML views of SAPUI5 Application development. They are generated during startup of the Eclipse runtime.

The templates are an overview over all available

  • control properties
  • aggregations
  • associations and
  • events

To use the JavaScript and XML templates, the SAPUI5 application development tools feature has to be installed in your Eclipse.

Note If your Eclipse installation contains the feature org.eclipse.wst.jsdt.feature in Version 1.3.1, we recommend to update it. In this version, invoking the JavaScript and XML code completion may cause Eclipse to crash.

Procedure

  1. To insert a template, open the JavaScript editor.
  2. Start typing the name of the respective control or the name of the alias, for example button.
  3. Choose CRTL + SPACE and choose the control from the code completion list.

    SAPUI5 ApplTools JavaScript Templates Select

    All properties and events are inserted.

    SAPUI5 ApplTools JS Templates Insert