Show TOC

Background documentationEditor Framework Objects Locate this document in the navigation structure

 

A custom editor makes use of the following objects:

  • Editor: A portal component whose class extends AbstractEditorComponent and which represents the overall editor. The following are key editor objects:

    • Editor Context (IEditorContext): Holds the current state of editor, as well as the data model that holds the data currently being edited. The editor context is an IEditorContext object, which is generally supplied as a parameter in the key methods of the editor framework.

    • Editor Response (IEditorResponse): Provides access to the portal response object, and enables you to do the following:

      • Set Save Question: The save question is displayed whenever the administrator clicks Save in the generic toolbar.

      • Set Administrator Message: This message is displayed in the standard portal message bar at the end of the current request.

        You may want to display a message, for example, after you throw an exception to cancel the saving of the editor's data, or after displaying the user interface for an editor pane.

      • Set Client Properties: These properties are set on the server side but are available on the client side in parametersMap, a JavaScript object. Values are obtained via the get() method.

      The editor response is an IEditorResponse object, and is available from the editor context.

  • Panes: A set of Java classes, each of which implements IEditorPane and represents one pane of the user interface. Each pane can have the following characteristics:

    • Visible/Hidden: If a pane is visible, a radio button is displayed for it in the pane selection area at the top of the editor. If a pane is invisible, the pane can only be displayed via code, through an activating an event.

    • Default Pane: The default pane is the pane displayed when the editor is launched.

    • Activating Event: A pane's activating event is the server event that causes the editor to navigate to that pane.

    A pane's properties are set when it is created in the editor component's setupEditor() method.

  • Data Handler: A Java class that extends PCMDataHandler that defines methods for loading data into the editor context and saving data from the editor context.

    To make the data handler accessible to editors defined in other PARs, the data handler must be defined as a service and implement IService.

    For more information on the editor context and data model, see Data Model.

Key Classes/Interfaces

Class/Interface

Description

AbstractEditorComponent

Extended by the editor component.

IEditorContext

Represents the current state of the editor.

IEditorResponse

Provides access to the portal response, as well as additional functionality for the editor framework.

IEditorPane

Implemented by each pane.

PCMDataHandler

Extended by an editor's custom data handler.