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
- 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>
- 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:
The enablement condition ensures that the tab is not displayed when a version of the object is displayed.<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>
- Save your changes.