uniface.Instance
The uniface.Instance object provides access to selected properties and methods of the component instance that it represents.
Functions
Function |
Description |
---|---|
getName() | Returns the name of the uniface.Instance |
getShortName() | Returns the short name of the current
uniface.Instance. For a component Instance , this is the same as
its name. However, other API objects have a similar function that returns shorter names than
getName. |
getComponentName() | Returns the component name of this uniface.Instance. |
getType() | Returns a constant string denoting the uniface.Instance type: uniface.TYPE_DSPINSTANCE. |
getParent() | Returns null because a
uniface.Instance is always a top-level object. |
getEntities() | Returns an array of uniface.Entity objects representing the outer entities of the uniface.Instance. |
getEntity() | Returns the uniface.Entity object that represents the named outer entity. |
isEqualTo() | Checks whether the uniface.Instance object is the same as another uniface.getInstance object. |
createView | Create a View of the uniface.Instance object. |
getView() | Return an instance of uniface.View representing the view with the specific name. If it does not exist or is not valid, return null. Otherwise return the View. |
getViews | Return an array of uniface.View instances for every view of this component instance. |
getData() | Serializes the component definition, layout, and data of the specified uniface.Instance into a JSON stream. |
setData() | Deserializes and loads component instance information (component definition, layout, and data) from a JSON stream into the specified uniface.Instance object. |
Function |
Description |
---|---|
activate() | Activate an operation or supported trigger on the current component instance. The called operation can be executed on the client or the server, depending on how it is declared. |
remove | Detach and delete the current component instance, detaching any child instances |
Description
The uniface.Instance object represents an instance of a Uniface component, including its data and layout. Each instance may have multiple views which can be used to present the data.
It is returned by the uniface.getInstance function. The getParent function of a uniface.Entity object can also return a uniface.Instance object.
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);