Adding messages to the Management Center

The Management Center status bar and message console include information about the tasks that a business user completes, or attempts to complete. Rather than hardcoding UI text in the OpenLaszlo class files, include all message text in resource properties files, and associate the files with resource keys. This way, you maintain the UI code in one area (the OpenLaszlo file) and the messages in another (properties file). This method is useful if you have messages that change frequently, or require translation.

Before you begin

Before you define resource bundles, see wcfResourceBundle.

Procedure

To define properties files and bundle keys for UI text:
  1. Go to this directory: WCDE_installdir\LOBTools\src\com\your_company_name\catalog\client\lobtools\properties.
  2. Create a properties file by using any text editor. Use the .properties extension. Within this file, list all the UI text and associate a unique key for each string of text. For example, to include three tabs (called A, B, and C), on the properties view for an object, include code similar to the following example:
    keyA=A
    keyB=B
    keyC=C
    
  3. Create resource bundle to associate with the keys:
    1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
    2. In the Project Explorer view, expand LOBTools > WebContent > WEB-INF > src > lzx > your_company_name > Management_Center_component, where Management_Center_component is the name of your new custom tool.
    3. Create an OpenLaszlo class file with this syntax: Management_Center_component in camel caseResourceBundle.lzx. For example, CatalogManagementResourceBundle.lzx
    4. Within the resource bundle file, the class name must follow this syntax: <three-character Management Center component code in lower caseResourceBundle. For example, catCatalogManagementResourceBundle.

What to do next

After you complete your work:
  1. Right-click LOBTools Project; then click Build OpenLaszlo Project to produce an updated ManagementCenter.swf file under the WCDE_installdir\workspace\LOBTools\WebContent directory. This setting is the default environment setting.
  2. Test your work by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
  3. Deploy your files to your production environment.