When configuring an itemMapping category that contains multiple tabs, you must use the includedCategories or includedProperties attribute for each itemViewMapping (or tab) to prevent properties from being duplicated across tabs.

The default category itemMapping and itemViewMapping is defined in the SiteAdmin/Versioned/install/data/viewmapping.xml file:

<add-item item-descriptor="itemMapping" id="SaImSiteDefaultCategory">
  <set-property name="name"><![CDATA[SiteCategory:default]]></set-property>
  <set-property name="description"><![CDATA[AssetManager default site
      itemMapping]]></set-property>
  <set-property name="mode"><![CDATA[AmMmDef]]></set-property>
  <set-property name="itemPath"><![CDATA[/atg/multisite/SiteRepository]]>
     </set-property>
  <set-property name="itemName"><![CDATA[siteConfiguration]]></set-property>
  <set-property name="formHandler"><![CDATA[SaFhSite]]></set-property>
  <set-property name="viewMappings"><![CDATA[SaIvmSiteDefaultCategory]]>
     </set-property>
  <set-property name="attributes"><![CDATA[resourceBundle=SaAvSiteBnd,
     showCreationId=SaAvCatCreateId]]></set-property>

</add-item>
<add-item item-descriptor="itemViewMapping" id="SaIvmSiteDefaultCategory">
  <set-property name="name"><![CDATA[AssetManager default site
      itemViewMapping]]></set-property>
  <set-property name="displayName">
      <![CDATA[SaIvmSiteDefaultCategory.displayName]]></set-property>
  <set-property name="view"><![CDATA[SaIvBaseSiteConfig]]></set-property>
  <set-property name="propertyMappings"><![CDATA[openDate=SaPvmTimeStamp,
      closingDate=SaPvmTimeStamp,name=SaPvmSiteName,contextRoot=SaPvmSiteURL,
      productionURL=SaPvmSiteURL,siteDownURL=SaPvmSiteURL,
      preOpeningURL=SaPvmSiteURL,postClosingURL=SaPvmSiteURL,
      additionalProductionURLs=SaPvmAlternativeURL,sitePriority=SaPvmSitePriority,
      siteTypes=SaPvmSiteTypes]]></set-property>
  <set-property name="attributeValues"><![CDATA[resourceBundle=SaAvSiteBnd,
      includedCategories=SaAvDefCatIncludedCats,
      includeNewProperties=SaAvDefCatIncNewProps]]></set-property>
</add-item>

<add-item item-descriptor="attributeValue" id="SaAvDefCatIncNewProps">
  <set-property name="value"><![CDATA[true]]></set-property>
</add-item>

The includeNewProperties attribute automatically adds any new properties that have no category defined to the itemViewMapping that this attribute is set on. For example, if the includeNewProperties attribute is set in the default itemViewMapping in SiteAdmin/Versioned/install/data/viewmapping.xml; any new properties will be displayed in this itemViewMapping (tab), no matter what module they’re defined in.

For new properties to appear in the tabs corresponding to the modules in which they were defined, a property must belong to a category that has already been included by an itemViewMapping. If the property also defines a new category, that category must be updated in the itemViewMapping’s includedCategories attribute.

The default properties that are displayed in the Site Administration module are contained in the categoryBasics, categoryLife and categoryHistory categories. The attributeValues tag references the includedCategories attribute. The following add-item tag defines these three categories:

<add-item item-descriptor="attributeValue" id="SaAvDefCatIncludedCats">
  <set-property name="value"><![CDATA[categoryBasics,categoryLife,
      categoryHistory]]></set-property>
</add-item>
Adding a Category Tab in Commerce

Using the DCS-UI/SiteAdmin/Versioned/install/data/viewmapping.xml file, update the Commerce properties defined in the DCS module. Modify the default Ops category attributeValue item mapping created in the SiteAdmin.Versioned module:

<!-- Update the default site category 'Ops' itemViewMapping's includedCategories
     value. -->
<update-item item-descriptor="attributeValue" id="SaAvDefCatIncCatsOps"
    skip-update="true">
  <set-property name="value" add="true" value=",categoryCommerce"></set-property>
</update-item>

For detailed information on working with view mappings in Commerce, refer to the Commerce Programming Guide.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices