Introduced in Feature Pack 2

Hiding unversioned contents of a business object

When viewing versions of an object, you might want to hide the parts of the object that are not versioned. For example, if the merchandising associations are not saved when a product version is created, you might want to hide the Merchandising Association tab when viewing the product version.

Procedure

  1. Locate the property definition of the part of the object you want to hide.
    For example, to hide the Merchandising Association tab, locate the property definition in the ProductPropertiesView.def file as shown:
    <PropertyTabPane name="productMerchandisingAssociationsTab" text="${catalogResources.productMerchandisingAssociationsTab}">
    <!-- Property Pane: Merchandising Associations. This is an instantiation of the property pane class which contains merchandising associations details. -->
    <PropertyPane baseDefinitionName="catProductMerchandisingAssociations"/>
    </PropertyTabPane> 
  2. Add an enablement condition to the definition.
    For example, to hide the Merchandising Association tab when viewing the version of a product, you add the following code snippet: <EnablementCondition enablementValue="" propertyName="objectVersionId" conditionId="noObjectVersionIdCondition"/>.
    The complete property definition for the tab:
    <PropertyTabPane name="productMerchandisingAssociationsTab" text="${catalogResources.productMerchandisingAssociationsTab}">
    <EnablementCondition enablementValue="" propertyName="objectVersionId" conditionId="noObjectVersionIdCondition"/>
    <!-- Property Pane: Merchandising Associations. This is an instantiation of the property pane class which contains merchandising associations details. -->
    <PropertyPane baseDefinitionName="catProductMerchandisingAssociations"/>
    </PropertyTabPane> 
    The enablement condition ensures that the tab is not displayed when a version of the object is displayed.
  3. Save your changes.

What to do next

At a later date, if you choose to support versioning the part of the business object that was hidden, remove the enablement condition added to the property definition.