Tutorials > Sales Center > Customize the appearance of the IBM Sales Center
Determine extension points
In this step of the tutorial, we will determine what parts of the IBM Sales Center client need to be modified. The text used on the user interface of the IBM Sales Center is contained in a single resource bundle called telesalesResources.properties. You will need to examine this resource bundle, locate the text that to change, and make note of the key that is used to represent that text. You will also need to locate the images that to replace and make note of both the names of the files as well as their directories.
Procedure
- Enable widget hover logging.
Widget hover logging helps you determine the id of the widget to modify.
To enable widget hover logging:
- Import the com.ibm.commerce.telesales.ui.impl.* plug-ins as binary projects. By importing these plug-ins as projects, we will be able to search for the id of the user interface element to change:
- In the Plug-ins view, select all the plug-ins that begin with com.ibm.commerce.telesales.ui.impl.
- Right-click the selected plug-ins and select Import > As Binary Project. The plug-in projects display in the Package Explorer view.
- Enable widget hover logging. When widget hover logging is enabled, you can hover the mouse pointer over the user interface widget to change, and its id will display in the console of the IBM Sales Center development environment:
- In the IBM Sales Center development environment, click Run > Run.
- In the Run window, select the Trace tab.
- Select Enable tracing for the selected plug-ins.
- In the Plug-ins and support tracing pane, select com.ibm.commerce.telesales.widgets. Your screen should appear similar to the following screen capture:
- Click Run.
- Determine what text to replace.
- In the IBM Sales Center client, click Open > IBM Sales Center - Order Management.
- Click File > Logon. The logon dialog is displayed as in the following screen capture:
- Hover the mouse pointer over the following text: To log on to the IBM Sales Center, type the user name and password. If you do not know them, contact the system administrator.
- In the Console view of the IBM Sales Center development environment, you should see the following text: Mouse hover control ID is 'com.ibm.commerce.telesales.ui.impl.logonInstructionsLabel'.
- Determine in which plug-in this id is defined:
- From the Search menu, select File.
- In the File Search tab, in the Containing text field, enter logonInstructionsLabel.
- Click Search. The Search view shows that the logonInstructionsLabel is defined in the com.ibm.commerce.telesales.ui.impl.operator plug-in's fragment.xml file.
- Open the com.ibm.commerce.telesales.ui.impl.operator plug-in's fragment.xml file.
- Locate the following control tag: <control type="label" text="LogonDialog.instructions"> </control>
This control tag indicates that the text that displays in the logonInstructionsLabel has a key of LogonDialog.instructions. All default translatable text is defined in the telesalesResources_ locale.properties files. This tutorial refers to only the en_US locale, which is, by default the telesalesResources.properties file in the com.ibm.commerce.telesales.resources plug-in. Other supported national languages properties files are located in the com.ibm.commerce.telesales.resources.nl1 plug-in.
- Examine the telesalesResources.properties file:
- Switch to the Plug-ins view.
- Expand the com.ibm.commerce.telesales.resources package
- Expand the resources directory.
- Double-click the telesalesResources.properties file.
- Within the properties editor that opens, search for the "To log on to the IBM Sales Center" text string. You will find the following text: LogonDialog.instructions = To log on to the IBM Sales Center, type the user name and password. If you do not know them, contact the system administrator.
- As previously mentioned, the key associated with the text to change LogonDialog.instructions. Make note of this key as we will need to use this value when you create the own resources bundle. In the new resources bundle we will associate this key with the text that to have displayed.
- Also make note of the LogonDialog.applicationTitle key, as we will need to change the text in the title bar of the log on dialog.
- Disable the widget hover logging:
- Click Run > Run.
- In the Run window, select the Trace tab.
- Deselect Enable tracing for the selected plug-ins.
- Click Apply.
- Click Close.
- Determine what images to replace.
For this tutorial, we will replace the following image:
To locate this image file:
- Ensure that you are using the Plug-ins view.
- Expand the com.ibm.commerce.telesales.resources plug-in.
- Expand icons > full > prod.
- Right-click websphere_telesales.jpg and select Open With > System Editor.
- Verify that this is the image to replace. Make note of the image name and directory
- You have now determined which image to replace and you know the directory in which it resides.
In this step, you determined what aspects of the IBM Sales Center client logon user interface need to be adjusted, and where to locate the files to perform those adjustments.