uniface

The uniface object enables you to obtain information about DSP instances.

Functions

Data Addressing Functions

Function

Description

getComponentName() Returns the component name of the main uniface.Instance.
getEntities() Returns an array of uniface.Entity objects representing the outer entities of the main uniface.Instance.
getEntity() Returns the uniface.Entity object that represents the named outer entity on the main uniface.Instance.
getInstanceNames() Returns an alphabetically-sorted array holding the names of all component instances that are accessible on the web page. The returned array always contains at least one component instance name (the outermost instance).
getInstance() Returns the main JavaScript object, or an object of type uniface.Instance, which gives access to selected properties of a component instance.
wrdurl Holds the base URL of the Web Request Dispatcher (WRD), which is the contact point for the Uniface backend. If not assigned, the default is used and wrdurl is undefined.
DSP Instance Functions

Function

Description

activate() Activate an operation or supported trigger on the main component instance. The called operation can be executed on the client or the server, depending on how it is declared.
createInstance() Creates a new DSP instance that is added to the component instances accessible on the web page.
remove Deletes the specified DSP instance, its data, and all child DSP instances and their data.

Description

The uniface object is the starting point for the JavaScript Data Addressing API.

It enables you to create, remove, and access uniface.Instance objects, and to concisely activate or access the main instance. This a uniface.Instance that is not contained by any other instance. Its component name is part of the page's URL, and its layout forms the HTML loaded by the browser. All other instances are either contained in a DSP container, or invisible.

If there is only one uniface.Instance or you want to address the main instance, you can use the following operations on the uniface object directly: activate, getComponentName, getEntity, and getEntities. Thus:

uniface.activate(args);

is a synonym for

uniface.getInstance().activate(args);

Constants for Object Types

The uniface object also provides the following constants to denote the types of object used in the API:

var vInstNameArray = uniface.getInstanceNames();
for (var i = 0; i < vInstNameArray.length; i++) {
    doSomethingWithInstName(vInstNameArray[i]);
}

var vInstance = uniface.getInstance("MUSICLIST");
doSomethingWithInstance(vInstance);