Implementing the Pages Creation

SECollab generally controls on its own how resources are displayed in web pages. Document resources (registered as documents of a Design) must define an associated Page instance. It enables controlling precisely how a user navigates in authoring tool data published in the application.

There are two types of pages:

For Architect Management, you are recommended to use the com.sodius.mdw.clm.common.publish.operations.CreateExplorerPage. This class assumes all resources, diagrams and types are already created in the Publisher model by the time is called. The CreateExplorerPage creates the following views:

  1. Diagrams
  2. Types

Here are the recommended steps to implement the operation:

  1. Choose a type of representation

    For each design document, determine whether a table or explorer representation is more suitable.

  2. Option 1 - Create a Table page

    1. Create a Page instance attached to the document resource.

    2. Create a TableView instance. A table view controls the presented columns and rows. Creating multiple views is convenient to present different set of nested resources (given some filter criteria) or different set of columns (to display values relevant to a particular activity or role).

      A TableView requires some attributes to be set:

      • title is displayed to the end user in the web pages.
      • GUID is an identifier unique in the scope of the design.
    3. Create a Table instance for each view, to define its content. A table defines columns, rows and cells.

      Column's width can be controlled using the hintWidth attribute (e.g. "150px").

      Rows are recommended to have an associated resource, whenever possible, which enables to display the resource properties when the row is selected.

      Cells may use the resource property values as is or combine multiple values into a text representation.

  3. Option 2 - Create an Explorer page

    1. Create a Page instance attached to the document resource.

    2. Create an ExplorerView instance. An explorer view controls the presented tree structure. Creating multiple views is convenient to present different set of nested resources, given some filter criteria.

      An ExplorerView requires some attributes to be set:

      • title is displayed to the end user in the web pages.
      • GUID is an unique identifier in the scope of the design.
    3. Create a Tree instance for each view to define its content. A tree defines a hierarchy of nodes. If the view shows a flat list of nodes, prefer instantiating a List, which has similar characteristics except the capability to present a hierarchy of nodes.

      A TreeNode requires some attributes to be set:

      • title is displayed to the end user in the web pages.
      • icon is displayed on the left of the title.
      • resource is the optional resource corresponding to the tree node, that is displayed when the node is selected.
      • table is the optional table corresponding to the tree, that is displayed when the node is selected. A table is typically used for a node that represents a type of resource, in which case the table lists the resources of that type. A node must not have both an associated resource and table.

Related reference
API Reference
Publisher Schema - Pages
Publisher Schema - Tables
Publisher Schema - Table of Contents