Plugging In an Information Page or Properties View

This is a developer-level activity.

The FileNet P8 Workplace application provides an out-of-box Information page that you can invoke on any stored object. For example, the following screen shot shows the Information page invoked for a document object. Note that the Information page provides a series of Information views (Properties, Security, Versions, and so on)

Information page for document object

Although the list of Information views can differ between object types, the default Workplace behavior is to make available the same set of views for the same object type. For example, the list of views in the above screen shot always appears for a document object.

Workplace provides the facility to replace the out-of-box Information page with one or more custom Information pages, and to specify filtering criteria based on object type, content type, or class ID. For example, you can present users with one Information page for plain text documents, another for spreadsheets, a third for stored searches, and the out-of-box Information page for all other object types.

Another customization option allows you to plug in your own Properties view, into the out-of-box Information page or into a custom one. You define the criteria on which the custom Properties view is launched, based on content type or class ID. So, for example, documents of different content types, or folders of different class IDs, could have a different Properties view, and the other views (Security, Versions, and so on) would be the same.

As shown in the screen shot below, an Information view in general, and the Properties view in particular, displays only a portion of the data on the Information page; that is, the Information page encapsulates the data of the Information view. If you're not yet familiar with the framework and base modules on which Workplace is built, this encapsulated presentation of information reflects a containment relationship of UI modules that render presentation and handle events of a single HTML page. WcmObjectInfo is the parent UI module that presents the Information page, and WcmPropertiesInfoPage is the child UI module that presents the Properties view. Though not the focus of this topic, UI modules and containment will come into play when you create a custom Properties view or Information page to plug into Workplace.

Properties view

After creating a custom Information page or a custom Properties view, you must register it, setting its location and configuration options in a Workplace XML file. Configuration of the custom components is the focus of this topic. For an Information page, you modify the info-page descriptor file; for a Properties page, you modify the properties page descriptor file.

This topic consists of the following sections:

Creating a Plug-in Component: An Overview

Creating a custom Information page or custom Properties view to plug into Workplace requires an understanding of the Web Application Toolkit framework and base modules on which the Workplace application is built. This section outlines the general steps you would take to create a new Information page and a new Properties view. For details on creating these custom components, refer to the following two sources:

To create an Information page:

  1. Create a framework Java™Server Pages (JSP) page (event JSP and UI JSP).

    In Workplace, the default framework Information page is Workplace/properties/ObjectInfo.jsp.

  2. Create a UI information module that serves as a container class for one or more information-view modules.

    In Workplace, the container information module is WcmObjectInfo.

  3. If you want the Information page to contain an Information view not already provided by Workplace, create a UI module that handles events and renders output for a specific view.
  4. In InfoPages.xml, add a "infoPage" object element that defines your custom Information Page. For example, the following "infoPage" object element registers the customInfo.jsp framework page, and specifies that the page be invoked when a request for information is made on document objects of content type "text/plain".

    <object key="infoPage">
      <setting key="url">properties/customInfo.jsp</setting>
      <array key="objectTypes">
        <value>document</value>
      </array>
      <array key="contentTypes">
        <value>text/plain</value>
      </array>
    </object>

  5. For each new Information view that you created, create a corresponding context-sensitive HTML help page. A help page is launched from the Help link on the Information page.

To create a Properties view:

  1. Create a UI module that encapsulates event handling and presentation for your Properties View.

    In Workplace, the default Properties view class is WcmPropertiesInfoPage. It is a child module of WcmObjectInfo.

  2. In PropertiesPage.xml, add a "propertyPageConfig" object element that defines your custom Properties view class. For example, the following "propertyPageConfig" object element registers the MyInfoPage class, and specifies that the class be invoked when a request for information is made on objects of content type "application/msword".

    <object key="propertyPageConfig">
      <setting key="class">com.filenet.wcm.apps.server.ui.info.MyInfoPage</setting>
      <array key="contentTypes">
        <value>application/msword</value>
      </array>
    </object>

  3. Create a context-sensitive HTML help page for your custom Properties view.

Info-Page Descriptor XML File

InfoPages.xml contains the definitions for Information pages. The file is located in the <AE_install_path>/FileNet/Config/AE folder. InfoPages.xml follows the Workplace Preferences XML Schema, Preferences.xsd, located in <AE_install_path>/Workplace/WEB-INF/xml.

NOTES  

File Structure of InfoPages.xml

As shown in the listing below, InfoPages.xml consists of two sections. The first is a list of one or more custom Information pages. The second is an object element specifying the default Information page. The default Information page is invoked if an object's object type, content type, or class ID does not match any of the criterion in the list of custom Information pages.

To add a custom Information page, add an "infoPage" object element with the applicable settings. Settings are described in Configuration Settings in InfoPages.xml

<object key="objectInfoPages" version="4.0">
<!-- list of custom Information pages -->
  <list key="pages">
   <object key="infoPage">
    <array key="objectTypes">
      <value>document</value>
    </array>
    <array key="contentTypes">
      <value>text/plain</value>
    </array>
    <setting key="url">properties/customInfo1.jsp</setting>
    <setting key="isPopup">true</setting>
    <setting key="popupHeight">250</setting>
    <setting key="popupWidth">550</setting>
    <setting key="useToken">false</setting>
   </object>
   <object key="infoPage">
    <array key="objectTypes">
      <value>folder</value>   
    </array>
    <array key="classes">
      <value>{63F8AA94-E2B9-11D0-ADF6-00C04FB66DAD}</value>
      <value>{A73BEEB2-B0B7-11D2-8853-0000F80883E3}</value>
    </array>
    <setting key="url">properties/customInfo2.jsp</setting>
    <setting key="isPopup">false</setting>
    <setting key="useToken">false</setting>
   </object>
   ...
  <list/>

  <!-- default Information page -->
  <object key="defaultInfoPage">
    <setting key="url">properties/ObjectInfo.jsp</setting>
    <setting key="isPopup">false</setting>
    <setting key="useToken">false</setting>
  </object>
</object>

Configuration Settings in InfoPages.xml

The following table describes the settings for the "infoPage" object element and the "defaultInfoPage" object element. Each setting is identified by its key attribute. Unless otherwise specified, a setting is optional. If an optional setting is not present, its default value is used.

"infoPage/defaultInfoPage" Object Setting Value
<array key="objectTypes">
  <value>document</value>
  <value>folder</value>
  <value>customobject</value>
</array>
Defines the list of object types valid for this Information page. Not applicable for the "defaultInfoPage" element. If this setting is not present, all object types are valid. Valid values are:
 - objectstore
 - folder
 - document
 - storedsearch
 - searchtemplate
 - customobject
 - link
 - event
<array key="contentTypes">
  <value>image/jpeg</value>
  <value>image/tiff</value>
  <value>text/*</value>
  <value>application/??-word</value>
</array>
Defines the list of mime types and container types valid for this Information page. Not applicable for the "defaultInfoPage" element. The page will be available only for objects of the specified content types. If not present, this page will be available for all content types.

The values in this setting support "*" and "?" wildcards. "*" means any number of characters (including 0 characters). "?" means one character.
<array key="classes">
  <value>{63F8AA94-E2B9-11D0
    -ADF6-00C04FB66DAD}</value>
  <value>{A73BEEB2-B0B7-11D2
    -8853-0000F80883E3}</value>
</array>
Defines the list of classes that are valid for this Information page. Not applicable for the "defaultInfoPage" element. The values must be in GUID format. The page will be available only for the classes listed.
<setting key="url">
  properties/customInfo2.jsp
</setting>
Defines the URL of the Information page. This setting is required. If the URL does not start with "http://", then it's considered to be a relative URL, and, when redirecting, the base path of the Workplace application will be prepended to the URL.

For example, if the URL is "properties/customInfo2.jsp", and the base URL is "http://myserver/Workplace", Workplace will redirect to "http://myserver/Workplace/properties/customInfo2.jsp".
<setting key="useToken">
  false
</setting>
If the value is true, a user token will be appended to the URL before redirecting. This will only happen if token support is turned on in Site Preferences. Default value is false.
<setting key="isPopup">
  true
</setting>
If the value is true, the Information page will open in a new window. Default value is false.
<setting key="popupHeight">
  250
</setting>
Defines the pixel height of the new window. This setting is ignored if isPopup is set to false. Default value is 600.
<setting key="popupWidth">
  550
</setting>
Defines the pixel width of the new window. This setting is ignored if isPopup is set to false. Default value is 800.
<setting key="rmOnly">
  true
</setting>
If the value is true, the Information page is only valid if Records Manager is turned on for the object's object store. Default value is false.

Properties Page Descriptor XML File

PropertiesPage.xml defines custom Properties view replacements for the out-of-box Properties view. The file is located in <AE_install_path>/FileNet/Config/AE folder. PropertiesPage.xml follows the Workplace Preferences XML Schema, Preferences.xsd, located in <AE_install_path>/Workplace/WEB-INF/xml.

NOTES  

As shown in the listing below, you can define multiple custom Properties views based on the content types and class IDs of objects.

<object key="propertyPageConfiguration" version="4.0">
  <list key="propertyPages">
    <object key="propertyPageConfig">
      <setting key="class">my.info.custom.MyProperties1</setting>
      <array key="classes">
        <value>{63F8AA94-E2B9-11D0-ADF6-00C04FB66DAD}</value>
        <value>{A73BEEB2-B0B7-11D2-8853-0000F80883E3}</value>
      </array>
      <array key="contentTypes">
        <value>text/plain</value>
      </array>
    </object>
    ...
  </list>
</object>

Configuration Settings in PropertiesPage.xml

The following table describes the settings for the "propertyPageConfig" object element. Each setting is identified by its key attribute. Unless otherwise specified, a setting is not required.

"propertyPageConfig" Object Setting Value
<setting key="class">
  com.filenet.wcm.apps.server.
    ui.info.custom.MyProperties1
</setting>
Specifies the UI module that performs event handling and rendering for the Properties view. Use the fully qualified name. This setting is required.
<array key="contentTypes">
  <value>image/jpeg</value>
  <value>image/tiff</value>
  <value>text/*</value>
  <value>application/??-word</value>
</array>
Defines the list of mime types and container types valid for this Properties view. The view will be available only for objects of the specified content types. If this key is excluded, this Properties view will be available for all content types.

The values in this setting support "*" and "?" wildcards. "*" means any number of characters (including 0 characters). "?" means one character.
<array key="classes">
  <value>{63F8AA94-E2B9-11D0
    -ADF6-00C04FB66DAD}</value>
  <value>{A73BEEB2-B0B7-11D2
    -8853-0000F80883E3}</value>
</array>
Defines the list of classes that are valid for this Properties view. The values must be in GUID format. The Properties view will be available only for the classes listed. If this key is excluded, the Properties view will be available for all classes.