As a transitional step, this site will temporarily be made Read-Only from July 8th until the new community launch. During this time, you can still search and read articles and discussions.

While the community is read-only, if you have questions or issues requiring TIBCO review/response, please access the new TIBCO Community and select "Ask A Question."

You will need to register or log in or register to engage in the new community.

Extending the Document using the TIBCO Spotfire® Document Model Framework API

Last updated:
12:48am May 10, 2017


This page describes how to extend the document model in TIBCO Spotfire® using the Document Model Framework API.

The document model is a node tree. It is extended by adding new nodes.

Usually the custom document node will be designed for a specific purpose, which may greatly differ between nodes. You will inherit from the specialised classes such as CustomPanel or CustomVisual or from the all-purpose CustomNode. In the end, all these classes inherit from DocumentNode. If your specialized node contains additional nodes, you can add nodes directly inheriting from DocumentNode.

Creating a document node

The general work order when adding a document node is as follows:

  1. Create a DocumentNode class.
    DocumentNode is the abstract base class for all types in the model. The document is extended by creating, attaching and configuring nodes. The class must derive from the DocumentNode base class or a subclass to it. 
    The class must be marked with the Serializable and PersistenceVersion attributes.
  2. Create an inner PropertyNames class.
    Every property of a custom document node must have an associated identifier, a Property Name.
  3. Add Undoable Nodes.
    Document nodes must not be modified. Instead they may contain Undoable Nodes, a special, modifiable kind of nodes.
  4. Add Readonly Properties.
    Some properties stored in ordinary readonly fields never change after initialization. They nevertheless must be initialized in a special way for the Document Model Framework to keep track of them.
  5. Optionally, add the following entities to your node:
    1. Runtime Properties.
      A runtime property is defined at runtime. It can be computed from other properties in the document.
    2. Event Handlers for internal events.
      The Document Model Framework separates internal and external events. Internal events update the model to a consistent state. External events update the view to reflect the state of the model.
    3. configuration phase.
    4. Public methods