+

Search Tips   |   Advanced Search

List-rendering profile keys

The following list shows the set of list-rendering profile entry keys available in the IBM DDC framework.

    Name
    Name of this list-rendering profile. Specifying the name is mandatory for each rendering profile. We can reference this value through the profile attribute of the [Plugin:ListRenderingContext] tag and through the Extends list-rendering profile entry of other list-rendering profiles. The Extends list-rendering profile entry is described later in this list. If this profile does not reference a resource bundle through the ResourceBundleBaseName key, this name also shows up in the Insert a tag dialog of the Web Content Manager authoring user interface. The name must be unique among all list-rendering profiles in the system.

    Example: To set the name of the profile identified by profile ID xyz to myCo.ProductList, specify...

      xyz.name=myCo.ProductList

    BeanListProviderID
    Specify the ID for the DDC plug-in is mandatory for each list-rendering profile. It specifies the extension ID of the DDC plug-in used with this profile. The DDC plug-in also gets the calls for computing all computed item attributes. Computed item attributes are described later in this list.

    Example: To use the generic XML DDC plug-in, specify...

      xyz.BeanListProviderID=ibm.portal.ddc.xml

    ResourceBundleBaseName
    The resource bundle base name is optional. It specifies the base name of the Java resource bundle that serves the translated strings for the name of this profile and all item attributes defined in this profile. The translated strings include associated, computed, and constructed item attributes. The resource bundle base name must identify a Java resource bundle available in the portal class path.

    Example: To use the resource bundle myCo.Bundle for the profile identified by profile ID xyz, specified xyz.ResourceBundleBaseName=myCo.Bundle

    IsShownInAuthoringUI
    Valid values are true and false. If false, the list-rendering profile does not show up in the Select the target component for this tag selection list of the Insert a Tag dialog of the WCM authoring user interface.

    NamespaceMapping
    The namespace mapping is optional. It specifies an individual XML namespace mapping to be used when you evaluate XPath expressions on XML documents that are transformed with this profile. For the name, specify the local name of the namespace mapping. For the value, specify the associated XML namespace URI. The namespace mapping is ignored by profiles of type Custom.

    Example: To map the XML namespace URI http://www.w3.org/2005/Atom to the local name atom in the profile identified by the profile ID xyz, specify xyz.NamespaceMapping.atom=http://www.w3.org/2005/Atom.

    ListItemSelection
    List item selection is mandatory for profiles of type XPath. It defines the XPath statement used to break down the source XML document into a list of individual XML fragments. Each fragment serves the data for a corresponding item in the resulting bean list. The DDC plug-in evaluates the XPath statement against the root element of the source XML document. For the value, specify a valid XPath statement. Profiles of type Custom ignore the list item selection.

    Example: To turn all entries in an Atom feed into list items in the profile identified by the profile ID xyz, specify xyz.ListItemSelection=//atom:entry.

    ItemAttribute
    This key declares an attribute available in all items in the list. The attribute values can then be accessed in the WCM design components using the [AttributeResource attributeName=""] tag by setting attributeName to the name value of the corresponding ItemAttribute declaration. For example, to access the value of an item attribute declared with the key xyz.ItemAttribute.myTitle, use the following WCM tag [AttributeResource attributeName="myTitle"]. Furthermore, declared attributes are listed in the Select attribute resource tag type selection box of the Insert a Tag dialog of the WCM authoring user interface when we select the containing profile in the Select the target component for this tag selection box.

    Each profile must define at least one ItemAttribute named id. This ID is used to uniquely identify an individual item in the list.

    In profiles of type XPath, the value for an item attribute declaration is an XPath statement used for extracting the declared attribute value from the XML source document. The DDC plug-in evaluates the XPath statement for each item in the lists relative to the corresponding XML fragments that are identified using the ListItemSelection specification.

    Example: To extract the title of the entries in an Atom feed XML document, specify xyz.ItemAttribute.title=./atom:title.

    AssociatedItemAttribute
    This key declares an attribute available in all items in the list. We can access the attribute values accessed in the WCM design components in the same way as item attributes. They also appear in the same places in the WCM authoring user interface. The difference is that in XPath based profiles, use associated item attribute declarations to extract data not directly from the source XML document. Instead, we can extract data from a linked XML source document referenced by the source XML document. To define an associated item attribute, build the value for such an entry by combining a source URL with an XPath statement to select the attribute value from the linked document. We specify the source URL using the name of the attribute that selects the source URL from the current bean list. We specify the ItemAttribute reference that provides the document URL using the pattern {$item-attribute-name}

    Example: To obtain the full product description from a list of products, specify as follows:

      xyz.ItemAttribute.detailsLink=./atom:link[@rel="details"]/@href xyz.AssociatedItemAttribute.productFullDescription={$detailsLink}//Attribute[@id="desc"]

    The DDC plug-in computes the values for this attribute in the following sequence:

    1. The DDC plug-in evaluates the value of the detailsLink item attribute.

    2. The DDC plug-in loads the XML document from that URL.

    3. The DDC plug-in evaluates the XPath statement detailsLink on that document.

    ConstructedItemAttribute
    This key declares an attribute available in all items in the list. If we define such an attribute, we can access the attribute values in the WCM design components in the same way as item attributes. The attribute values also appear in the same places as item attributes in the WCM authoring user interface. The difference between the two attribute types is as follows: We can build the values for constructed item attributes by combining the values from one or more other item attributes that have a static string. To define a constructed item attribute, provide a template string used to build the actual attribute values. The template string can contain arbitrary text that is mixed with item attribute references. To specify the ItemAttribute references, you provide the document URL using the pattern {$item-attribute-name}. Example: To construct an image URL from an image location and image file name item attribute, specify as follows:

      xyz.ItemAttribute.imageLocation=./imageLocation xyz.ItemAttribute.imageFileName=./imageName xyz.ConstructedItemAttribute.imageURL={$imageLocation}/{$imageName}

    ComputedItemAttribute
    This key declares an attribute available in all items in the list. We can then access the attribute values in the WCM design components in the same way as item attributes. They attribute values also appear in the same places as item attributes in the WCM authoring user interface. The difference between the two types of attribute types is as follows: The values for computed item attributes are not extracted from XML documents but computed based on the item attribute values and other context information. The DDC plug-in associated to the list-rendering profile through the BeanListProviderID key computes the attribute values. To serve such data, the DDC plug-in implement the optional com.ibm.portal.wcm.plr.ComputedAttributeValueProvider Java interface. This interface is defined by the public IBM Digital Data Connector APIs. The computation is typically done based on the non-computed attribute values in combination with configuration data or other extra context information.

    The generic XML DDC plug-in supports no computed item attributes.

    To define a computed item attribute, we must declare on which data the attribute value computation depends:

    • The computed item attribute value depends only on the other item attribute values. In this case, set it to value {$lazy}.

    • The computed item attribute value depends on other item attribute values and on the current rendering context that is the current portlet request and response objects. These objects are not cached in the bean list cache, but they are recomputed for each rendering request. If the computed item attribute value depends on the current request context, set the value of such a computed item attribute value to the string {$default}.

    Example: To define an attribute representing a stateful portal resource URL that points to the current item, we can declare a computed item attribute such as this one: xyz.ComputedItemAttribute.portalLink={default}.

    During run time, the DDC framework then requests the actual values for this attribute. It does so by starting the following method on the specific DDC plug-in plug-in that associated with this list-rendering profile:

      com.ibm.portal.wcm.plr.ComputedAttributeValueProvider.getComputedItemAttributeValue()

    ListProperty
    This key declares a property of the list. We can then access the attribute values in the WCM design components. We do so using the [Plugin:ListRenderingContext action="getListProperty" key=""] tag and by setting the key to the name value of the corresponding ListProperty declaration. For example, to access the value of a list property declared with the key xyz.ListProperty.myProperty, we use the following WCM tag: [Plugin:ListRenderingContext action="getListProperty" key="myProperty"] The value for a list property declaration is an XPath statement used for extracting the declared attribute value from the XML source document. The plug-in evaluates the XPath statement relative to the root of the source XML document.

    Example: To get the link to the next feed page of an Atom feed, specify

      xyz.ListProperty.nextLink=./atom:feed/atom:link[@rel=\"next\"]/@href

    ComputedListProperty
    This key declares a list property of the list. We can then access the attribute values in the Web Content Manager design components in the same way as list properties. The difference between list properties and computed list properties as follows: The values for computed list properties are not extracted from XML documents, but computed based on the item attribute values and other context information. The DDC plug-in associated to the list-rendering profile through theBeanListProviderID key computes the property values. To serve such data, the DDC plug-in implement the optional com.ibm.portal.wcm.plr.ComputedAttributeValueProvider Java interface. This interface is defined by the public APIs of Digital Data Connector APIs. The computation is usually done based on the non-computed list property values in combination with configuration data or other extra context information.

    The generic XML DDC plug-in does not support computed list properties. To define a computed list property, we must declare on which of the following two types of data the property value computation depends:

    • The computed item attribute value depends only on the other list property values. In this case, set it to value {$lazy}.

    • The computed list property value depends on other list property values and on the current rendering context, that is the current portlet request and response objects. These objects are not cached in the bean list cache, but they are recomputed for each rendering request. If the computed list property value depends on the current request context, set the value of such a computed list property value to the value {$default}.

    Extends
    Use this key to define a derived profile. A derived profile includes the item attribute, list property declarations, and XML namespace mappings of other list-rendering profiles by referencing these profiles. For more information, read Create list-rendering profiles.


Parent Syntax for XPath based list-rendering profiles

Related tasks:

Create list-rendering profiles