Creating a Plugin |
Open Client Administration |
An Open Client plugin is created by calling the constructor function defined in the constructorFunction property of the object definition. This function call must return an object that the Open Client uses to control the plugin.
The following example demonstrates an Embedded object plugin being created:
var eo = new proiv.plugins.eo.constructors["TreeControl"](objectDefinition);
The constructor function is given the following parameters:
Item |
Description |
objectDefinition |
This is the object defined in the Object Definition File and may hold initialisation properties required by the plugin. |
Open Client adds an OC object to the object definition that holds the following properties:
Item |
Description |
name |
The unique name of the plugin. |
objectId |
A unique ID in Open Client. This can be prefixed to storage names and node IDs to make them unique. |
resourceRoot |
The file path on the server to the folder holding the Object Definition File. This may be needed if additional resources are to be located. |
node |
The browser node that is used to render the object. The style and other properties of this node are managed by the Open Client and should not be changed by the plugin. This property is only present for certain types of plugins. Refer to the Plugin Object Definition section for more details. |
isRefresh |
This setting will be TRUE if the plugin is being instantiated because the browser is doing a refresh. See the Browser Refresh section for why this may be useful. |
Topic ID: 800058