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
- In the Enterprise Explorer view,
expand , where Management_Center_component is
the name of your new custom tool.
- Create an OpenLaszlo library
file with this syntax:
Management_Center_component_in_camel_caseResources.lzx
.
For example, CatalogManagementResources.lzx - Add
a library tag to the file:
- 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:
- 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.
- Test your work by viewing them in the Management Center, using
this URL: https://hostname:8000/lobtools.
- Deploy
your files to your production environment.