Defining icons

Include graphics on the Management Center UI, such as in the main work area (list, properties, or calendar views), search, explorer view, menu, message, and help text. Rather than hard-coding image file names in many OpenLaszlo classes, include all paths to images in resource libraries, and associate the image paths with resource keys. This way, you keep all your image definitions in one location. This is particularly useful if you have images that will change often.

Before you begin

Before defining resource bundles, refer to any *Resources.lzx files provided with the Management Center tools. *Resources.lzx files are located in the WCDE_installdir\LOBTools\WebContent\WEB-INF\src\lzx\commerce\Management_Center_component\restricted directory.

Procedure

  1. In the Enterprise 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.
  2. Create an OpenLaszlo library file with this syntax: Management_Center_component_in_camel_caseResources.lzx. For example, CatalogManagementResources.lzx
  3. Add a library tag to the file:
    <library>
    
    </library>
  4. Within the library element, list all the UI images and associate a resource name with each path and file name. For example, to include three images (one for the Management Center toolbar, and two for the list and properties views), include something similar to this:
    <resource name="AToolbarIcon" src="../resources/AToolbar.png"/>
    <resource name="AThumbnail" src="../resources/AThumbnail.png"/> 
    <resource name="ALargeImage" src="../resources/ALargeImage.png"/>  

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.