JavaScript API

JavaScript API Structure

Domino Volt JavaScript API structure.




gui app page graphic

The graphic provides a high-level view of the JavaScript API object structure at run time. The Form interface is created once when the application is loaded into the browser, and is then reused every time form data needs to be displayed. The Form Data Business Object is dynamic and is loaded into the user interface each time a form is loaded or created.

Usage Details:
  • This library follows a security protocol as defined in Securing Domino Volt overview.
  • For applications with multiple forms, only the form user interface displayed has a Business Object assigned to it. The other forms are hidden, and do not point to data.
  • Tables point to a data element that is a list of Business Object data instances. These Business Object elements are of the same structure as the Business Objects used for a full form. The sub form that you create for editing the table data works only on one item in this list at a time. When it is not in use, it is hidden and does not point to any data.

Interface Model

Application
The application is the parent that contains forms. It provides a few useful general functions and can be used to get access to any of the forms. Although you can get access to all the forms, only the form currently being displayed has a data Business Object and can have its user interface modified.
Forms
There can be any number of forms in an application. Each form contains one or more pages that contain the items. There is a Business Object for each form that holds the data contained in the form.
Pages
Pages contain items that collect and display the information for the form. All items on a page can be accessed as properties directly on the page, for example, page.F_MySingleLineitem.setVisible(false);. Each item is accessed by its ID, which can be found in the composer by opening the item’s Properties panel.
Items
There are two types of items on a form: those that collect data, for example, Single Line Field and Timestamp, and those that do not, including Image, Text, and Section. Any item that collects data is associated with a Business Object Attribute that contains this data.
App pages
There can be any number of app pages in an application. Each page contains items that have the object type apItem to interact with the controls on the app page. Each item is accessed by its ID, which can be found in the composer by opening the item’s Properties panel.
apItem
Items on an app page have a specialized API that allows you to manage the content of the items. The API is similar to a combination of the Item API and the Business Object Attribute API. However, app pages do not have a business object, therefore these methods are directly on the individual items on the app page.

Data Model

Business Object
The Business Object contains all the data for a particular form. This data is contained in a Business Object Attribute for each data item contained in the form. These options can be accessed using the following syntax:
BO.F_MySingleLineitem

Each Business Object Attribute is accessed by its ID, which is found in the composer by opening the item’s Properties panel.

Business Object Attribute
Each item that is mapped to data has its own Business Object Attribute. The Business Object Attribute contains this data.
Note: Some items do not collect data. These items do not have a corresponding Business Object Attributes in the Business Object. For example: PageNavigation.