Show TOC

ParametersLocate this document in the navigation structure

Use

This section describes additional parameters in the editor framework.

Editor Parameters

The editor context holds the parameters that were passed to the editor in the URL, including the object ID of the object being edited, editor ID and session ID. To get these parameters, do the following:

  • To get a Map of all the parameters, call getIntialParameters() on the editor context.

  • To get the object ID, call getObjectID() on the editor context.

Client Parameters

The editor framework enables you to set a client-side parameter from a server-side method, for example, during creation of the user interface for a pane or during the handling of a server-side event.

To create a client-side parameter, call setClientProperty() on the editor response and pass the parameter name and value, as shown in the following example, where context is the editor context:

               context.getEditorResponse().setClientProperty("myKey","myValue");
            

The client-side parameters are available from the parametersMap JavaScript object by calling the object's get() method, as in the following example:

               parametersMap.get("myKey")
            

On the client side, you can add additional parameters to parametersMap by calling the object's set() method - for example, parametersMap.set("myKey2","myValue2") - but these parameters are only available during the current response.