The Management Center framework
uses the display name of a business object when that business object
is shown in the Management Center user interface.For example,
business object display names are used in tree node labels and properties
view titles.
Procedure
- Open
WebSphere Commerce Developer and switch to the Enterprise Explorer
view.
- Complete one of the following steps:
- In the Enterprise Explorer view, expand , where Management_Center_component is
the name of the tool you want to customize. The characteristics of
business objects are defined in the wcfObjectDefinition class. The displayNameProperty
and displayNameObjectPath attributes identify the business object
property that the Management Center framework uses as the business
object display name.
- In the Enterprise Explorer view, expand , where Management_Center_component is
the name of the tool you want to customize. The characteristics of
business objects are defined in the wcfObjectDefinition class. The displayNameProperty
and displayNameObjectPath attributes identify the business object
property that the Management Center framework uses as the business
object display name.
- Update the displayNameProperty and displayNameObjectPath
attributes to change the display name property that displays in tree
nodes and properties view titles.
For example, the
default property that is used as the display name for Catalog categories
is
identifier
. The following code snippet shows the
default attribute settings for this display name property:
<class name="catBaseCatalogGroupPrimaryObjectDefinition" extends="wcfPrimaryObjectDefinition"
isBaseDefinition="true"
displayNameProperty="identifier"
...
<PrimaryObjectDefinition compatibleObjectTypes="SalesCatalogGroup"
definitionName="catBaseCatalogGroupPrimaryObjectDefinition" detailsViewHeaderText="${catalogResources.UtilityPaneHeaderText}"
displayName="${catalogResources.masterCategory_DisplayName}"
displayNameProperty="identifier"
…
To change the display name from
identifier
to
the name of the category, change the displayNameProperty attribute
to
name and set the displayNameObjectPath attribute
to
CatalogGroupDescription. The following code
snippet shows the attribute settings for the displayNameObjectPath
property:
<class name="catBaseCatalogGroupPrimaryObjectDefinition" extends="wcfPrimaryObjectDefinition"
isBaseDefinition="true"
displayNameProperty="name"
displayNameObjectPath="CatalogGroupDescription"
...
<PrimaryObjectDefinition compatibleObjectTypes="SalesCatalogGroup"
definitionName="catBaseCatalogGroupPrimaryObjectDefinition" detailsViewHeaderText="${catalogResources.UtilityPaneHeaderText}"
displayName="${catalogResources.masterCategory_DisplayName}"
displayNameProperty="name"
displayNameObjectPath="CatalogGroupDescription"
…
- Optional: To change the
display name that appears in the Utilities view for the business object:
- In the Enterprise Explorer view, expand . Right-click
the CategorySearchGrid.def file and open the
file for editing.
- Locate the following code in the file:
<!---
This definition displays the identification characteristics of a list of the {@link CatalogGroup} objects.
It is used in the utilities pane search tab.
-->
<ObjectGrid definitionName="catCategoryUtilitiesSearchGrid" preferenceKey="catCategoryUtilitiesSearchGrid">
<GridIconTypeImage name="typeIcon" propertyName="null" required="true" text="${foundationResources.utilitiesGrid_type}" width="100"/>
<GridDisplayName name="displayName" propertyName="null" showLongDisplayName="true" text="${catalogResources.UtilityPaneHeaderText}" width="170"/>
<GridText name="categoryName" objectPath="CatalogGroupDescription" propertyName="name" text="${catalogResources.namePrompt}" visible="false" width="170"/>
<GridImage name="tImage" objectPath="CatalogGroupDescription" propertyName="tImage" sortable="false" text="${catalogResources.productThumbnail_ColumnHeader}" visible="false"/>
</ObjectGrid>
- Replace the line of code that specifies that the text
displayed in the Utilities view for a business object is the display
name of the business object, with code that specifies to use the value
set for the property name as the text instead.
For example,
to set the display name as the identifier, Replace the following line
of code
<GridDisplayName name="displayName" propertyName="null" showLongDisplayName="true" text="${catalogResources.UtilityPaneHeaderText}" width="170"/>
with
the following line of code:
<GridText name="displayName" propertyName="identifier" text="${catalogResources.UtilityPaneHeaderText}" width="170"/>
- Save your changes and close the file.
What to do next
After you complete your customization:
Version |
Steps |
|
- Right-click LOBTools Project;
then click Build OpenLaszlo Project to produce
an updated ManagementCenter.swf file under the workspace_dir\LOBTools\WebContent
directory. This setting is the default environment setting.
- Test your changes by viewing
them in the Management Center, using this URL: https://hostname:8000/lobtools.
- Deploy
your changes to your production environment.
|
|
- Test your changes by viewing them in the Management Center, using
this URL: https://hostname:8000/lobtools.
- Deploy
your changes to your production environment.
|