
In this lesson, you are
creating an extended properties file that contains the text for your
new folders and general tabs. A properties file is a resource bundle
that contains translatable text that displays in the user interface.
Attention: This tutorial is based on
the folder support that is included in Feature Pack 5 and is not recommended
if you are on a newer feature pack level. Beginning with Feature Pack
6, support is provided by default for grouping e-Marketing Spots,
activities, customer segments, marketing content, promotions, and
attribute dictionary attributes. This support includes the capability
of creating, changing, and deleting folders within the Management
Center Catalogs, Marketing, and Promotions tools. You are not able
to group folders created by following this tutorial with folders that
are created by using Management Center. If you create Management Center
folders by following the steps included in this tutorial, delete those
folders before you create folders by using Management Center. For
more information about folders, see
Folders.
Support is provided by
default for grouping content pages and layouts in the Commerce Composer tool.
This support includes creating, changing, and deleting folders with
the Commerce Composer tool.
About this task
To ensure that your folders properties and list views
in Management Center display folder-related text, you must add text
for folders to a properties file. Properties views are used to contain
text that displays on the Management Center user interface, such as
list and properties views for the main work area. Rather than hardcode
user interface text, include all text in resource properties files,
and associate the files with resource keys. This way, you maintain
the user interface code in one area, such as OpenLaszlo files or definition
files. You maintain the text for your folder-related user interface
elements in a separate properties file.
Procedure
- Create the com.mycompany.commerce.marketing.client.lobtools.properties package:
- In the Enterprise Explorer view, navigate to .
- Right-click Java Resources:src,
click .
- In the Name field, enter com.mycompany.commerce.marketing.client.lobtools.properties.
- Click Finish. The new package com.mycompany.commerce.marketing.client.lobtools.properties is
created.
- Create the EMarketingSpotFolderLOB.properties properties
file:
- Right-click the com.mycompany.commerce.marketing.client.lobtools.properties package.
Click and
click Next.
- For the File name, enter EMarketingSpotFolderLOB.properties,
click Finish.
- Create the EMarketingSpotFolderLOB_en_US.properties properties
file:
- Right-click the com.mycompany.commerce.marketing.client.lobtools.properties package.
Click and
click Next.
- For the File name, enter EMarketingSpotFolderLOB_en_US.properties,
click Finish.
- Add the properties definitions to your created properties
files.
- Open the EMarketingSpotFolderLOB.properties and EMarketingSpotFolderLOB_en_US.properties files
for editing, and add the following code into both files:
EmarketingSpotFolderObjectName=E-Marketing Spot Folder
EMarketingSpotFolderType=Type
EMarketingSpotFolderStore=Store
EmarketingSpotFolder_newEMarketingSpotFolderDisplayName=New E-Marketing Spot Folder
contextMenuNewEMarketingSpotFolder=New E-Marketing Spot Folder
# Marketing Folder Panel
EMarketingSpotFolder_newEMarketingSpotFolderProperties=E-Marketing Spot Folder Properties
EMarketingSpotFolder_name=Name
EMarketingSpotFolder_description=Description
EMarketingSpotFolder_parentFolder=Parent Folder
# Marketing Folder List Panel
EMarketingSpotFolderList_uniqueID=Unique ID
EMarketingSpotFolderList_identifier=Name
EMarketingSpotFolderList_description=Description
# Marketing Folder Titles
allEMarketingSpotFolders_headerText=Name
allEMarketingSpotFolders_displayText=E-Marketing Spot Folders
EMarketingSpotFolderListMenuTitle=E-Marketing Spot Folders List
EMarketingSpotFolderListTitle=E-Marketing Spot Folders List
EMarketingSpotFolderItemListMenuTitle=E-Marketing Spot List
EMarketingSpotFolderItemListTitle=E-Marketing Spot List
- Save your changes.
- Register the new property file in the resource bundle:
- In the Enterprise Explorer view, navigate to .
- Right-click lzx; select .
- In the Folder name field, enter mycompany.
Click Finish.
- Right-click mycompany; select .
- In the Folder name field, enter marketing.
Click Finish.
- Right-click marketing; select .
Click Next.
- In the File name field, enter extMarketingManagementResourceBundle.lzx.
- Click Finish. The extMarketingManagementResourceBundle.lzx file
opens.
- Add the following code to the file:
<library>
<class name="extMarketingResourceBundle" extends="wcfResourceBundle" baseName="com.mycompany.commerce.marketing.client.lobtools.properties.EMarketingSpotFolderLOB">
<wcfResourceBundleKey name="EmarketingSpotFolderObjectName"/>
<wcfResourceBundleKey name="EMarketingSpotFolderType"/>
<wcfResourceBundleKey name="EMarketingSpotFolderStore"/>
<wcfResourceBundleKey name="EmarketingSpotFolder_newEMarketingSpotFolderDisplayName"/>
<wcfResourceBundleKey name="EMarketingSpotFolder_newEMarketingSpotFolderProperties"/>
<wcfResourceBundleKey name="EMarketingSpotFolder_name"/>
<wcfResourceBundleKey name="EMarketingSpotFolder_description"/>
<wcfResourceBundleKey name="EMarketingSpotFolder_parentFolder"/>
<wcfResourceBundleKey name="EMarketingSpotFolderList_uniqueID"/>
<wcfResourceBundleKey name="EMarketingSpotFolderList_identifier"/>
<wcfResourceBundleKey name="EMarketingSpotFolderList_description"/>
<wcfResourceBundleKey name="contextMenuNewEMarketingSpotFolder"/>
<wcfResourceBundleKey name="allEMarketingSpotFolders_headerText"/>
<wcfResourceBundleKey name="allEMarketingSpotFolders_displayText"/>
<wcfResourceBundleKey name="EMarketingSpotFolderListMenuTitle"/>
<wcfResourceBundleKey name="EMarketingSpotFolderListTitle"/>
<wcfResourceBundleKey name="EMarketingSpotFolderItemListMenuTitle"/>
<wcfResourceBundleKey name="EMarketingSpotFolderItemListTitle"/>
</class>
<extMarketingResourceBundle id="extMarketingResources"/>
</library>
- Include the extMarketingManagementResourceBundle.lzx file
in the marketing extensions library to make the file available to
use:
- In the Enterprise Explorer view, navigate to LOBTools\WebContent\WEB-INF\src\lzx\commerce\marketing.
- Open the file MarketingExtensionsLibrary.lzx.
- Update the file to the following to point to the customized
resource bundle file:
<library>
<!-- File to add customer libraries -->
<include href="../../mycompany/marketing/extMarketingManagementResourceBundle.lzx"/>
</library>
- Save your changes.