JS Modules

The APS JS SDK provides a set of modules for creating and controlling various visual interface elements of web applications:

  • aps/Memory and aps/Store are used to store data and synchronize them with the APS controller database.

  • The other modules define widgets and display them in control panels.

In your application, you can declare a widget using one of the ways:

Regardless of a selected declaration way, all widgets must be located within the root container aps/PageContainer in accordance with the following rules:

  • Every widget is implemented by its own module in the aps namespace.

  • In an HTML page, the main widget aps/PageContainer layouts the page. It defines messages, screen captions, and other.

  • Every widget can be bound with a model using the watch and/or dojox/mvc/at method.

To verify which version of control panel is active, use the has(aps-bs) method (‘aps-bs’ stands for ‘APS bootstrap’). It returns true if UX1 is used. The following example illustrates how to create the Tiles container if UX1 is used:

if(has('aps-bs'))
   new Tiles({ ... });  // If UX1, then use aps/Tiles