Adding custom extended properties

You can add custom extended properties through the attr-descriptor.xml file.

The attr-descriptor.xml file contains standard attributes that are configurable by the Extended Properties portlet. If you need to modify the aggregator to utilize a new custom attribute, you can simply add the new attribute definition in the attributes descriptor file. The new attribute will be made available in the Extended Properties portlet for an administrator to configure.

Open wp_profile_root/PortalServer/wp.mobile/wp.mobile.mwp/shared/app/config/attr-descriptor.xml with a text editor and then find the following section in the file. There are several <Attribute-Group> elements named custom. Find the one for ea.attr.custom
<Attribute-Group name="custom" friendly-name="Custom Attributes" friendly-name-resource="ea.attr.custom"

      ...add your new custom attributes within this group...

</Attribute-Group>

Within this specific custom attribute group, you can add as many new attributes as you require. See the schema for more information on the formatting of the attribute element.

The following is an example of how to add a new attribute to control the logo image in the aggregator header for a specific page.
<Attribute name="headerlogo" type="string" required="false" max-length="255" friendly-name="Custom Header Logo">
      <Valid-For-Markup>xdime</Valid-For-Markup>
      <Valid-For-Node>page</Valid-For-Node>
</Attribute-Group>

In this example, a new string attribute called “headerlogo” with a fully qualified path of ea.attr.custom.headerlogo was created. It is not required because the aggregator can default to the original logo. The max-length is set to 255 because the WebSphere® Portal data store cannot store more than 255 bytes for the value.

The example also includes a friendly name that is displayed to an administrator by the Extended Properties portlet. This attribute is valid only for the XDIME aggregator and page nodes.

Note: The modified attr-descriptor.xml file must be reloaded to recognize the new changes. See the topic Extended Properties portlet for more information on reloading the attributes descriptor file.

The following topics describe how to modify the attr-descriptor.xml file for specific customization purposes.




Terms of use
(C) Copyright IBM Corporation 2012. All Rights Reserved.