Sun Java System Communications Express 6 2005Q4 Customization Guide

Customizing Address Book Icons and Labels

This section discusses how to customize address book icons and labels in Communications Express.

Customizing Icons

All the icons that are used for display in Address Book are defined under two files namely,

All Address Book related images are located under <uwcinstall>/absimx. Search-images.xsl and commonimages.xsl refer to images in this directory. To customize, you can add or replace the required images in this directory and then change the corresponding references in these files.

These are two examples on how you can modify the icons.

Example 7–1 Example

To change the icon for Printable as displayed in the toolbar of main page, you need to do the following.

Old Icon: Printable (File name: - LrlPrintable_1_wo.gif)

New Icon: New Printable (File name - ico_print.gif)

In commonimages.xsl, the reference is defined as,

<xsl:variable name="print_page.gif" select="'../absimx/LrlPrintable_1_wo.gif'"/>

To change the icon file reference,

Add ico_print.gif file into <uwcinstall>/absimx.

Change the reference in xsl:variable tag for print_page.gif from '../absimx/LrlPrintable_1_wo.gif' to '../absimx/ico_print.gif '.

Example 7–2 Example

- To add a banner image called AddressBook_banner.gif you need to do the following.

<xsl:variable name="AddressBook_banner.gif" select="'../absimx/AddressBook_banner.gif'"/>Then add the image in the required position in the desired .xsl file as

<img src="{$AddressBook_banner.gif}" width="200" height="29" title="SunONE Address Book"/>

Customizing Labels

All captions and displayable static items that are displayed in the Address Book can be customized. All the labels are defined in the dictionary-<lang>.xml file which is located under <uwcinstall>/WEB-INF/ui/html/abs directory. This XML file contains definitions in the following form

<word key="_Message">Message Actual Text</word>

The key is specified in the XSL file which is used to obtain the value of the <word> XML node. This value is eventually displayed during the rendering of XSL into HTML. In the XSL file, the key is specified in the <xsl:text> tag.

To customize a particular caption or a static label, change the text corresponding to desired key. To add new text,

The following example changes the label for 'New Contact' link on the Main page toolbar to 'Add Contact'. In the example ”en’ is assumed to be the language in which the label is displayed.

In search.xsl, the label is coded as following:

Example 7–3 Customization of the label:

<a class="ToolLbl" href="javascript:void(0)">
   <xsl:attribute name="onClick">
<xsl:value-of select="$selectedBook/entry/@entryID"/>
        <xsl:text>', 'NewContact', 
  <xsl:text>_New Contact</xsl:text>       -----> Label Definition

Example 7–4 shows the code before modifying the default definition in dictionary-en-xml

Example 7–4 Code before Modification of the Default Definition in Dictionary -en-xml

<word key="_View Calendar...">View Calendar...</word>

Example 7–5 shows the code before modifying the default definition in dictionary -en-xml

Example 7–5 Customized Default Definition in Dictionary -en-xml

<word key="_View Calendar...">View Schedule...</word>