Sun Java System Communications Express 6 2005Q4 Customization Guide

Chapter 2 Customizing General Features in Communications Express

This chapter describes how to customize some of the common elements in Communications Express. It also provides information related to JSP files and their location along with details on the common features that are customizable in Communications Express.

This chapter provides details on:

Guidelines to be Followed Before the Customization Process

Before you start customizing the application, it is important to understand how to edit an deploy the JSP files. The guidelines for customizing JSP files are as follows:

List of Customizable and Configurable Files for Calendar and Address Book

The following list of files are customizable and configurable for Calendar and Address Book. It is assumed here that the customization is performed before configuring Communications Express. The directories mentioned are relative to <install root>/lib/config-templates. If configured, the files are available in the location /var/opt/SUNWuwc

Table 2–1 List of Customizable files for Calendar and Address Book

File Location  

Customizable Files  

Name used in the document  

WEB-INF/config

All the configuration files 

<config-dir>

WEB-INF/domain

All i18n.properties files. i18n files are used to internationalize the interface for multiple languages 

<domain-dir>

WEB-INF/skin

themes.properties file 

<skin-dir>

WEB-INF/ui/html/abs

All the .html, .xml and .xsl files 

<ab-ui-dir>

absimx

All files such as .gif, .css, .html files 

<ab-images-dir>

uwc/css

All stylesheets(.css files) 

<css-dir>

uwc/images

All image files(*.gif, *.jpg) 

<uwc-images-dir>

uwc/js

.jsp files 

<js-dir>

uwc/calclient

.jsp files 

<calclient-dir>

uwc/mailclient

.jsp files 

<mailclient-dir>

uwc/common

.jsp files 

<common-dir>

Customizing Images

The calendar images can be customized by specifying the location for these icons in <skin-dir>/themes.properties.

To customize the icons, edit the themes.properties file to change the names of properties to contain a value that points to the location of the new images. A default value for image location will be used if the corresponding key is not defined in the themes. properties file.

Table 2–2 lists the common images that are located in <uwc-images-dir>.

Table 2–2 Location of the Common images in < uwc-images-dir>

Image/Icon  

Property Name  

Value  

Banner Image 

uwc-common-bannerImage

Masthead_s1UMC.gif 

Right Branding Image 

uwc-common-RightBrandingImage

logo_sun.gif 

Warning Image 

uwc-common-WarningImage

Warning_Large.gif 

Search Image 

uwc-common-SearchImage

LrlSearch_1_wo.gif 

Printable Image 

uwc-common-PrintableImage

LrlPrintable_1_wo.gif 

Import Export Image 

uwc-common-ImportExportImage

LrlImpExp_1_wo.gif 

Sort down and non selected image 

uwc-common-Sort-Down-NonSelected-image

sort_down_nonsel_che.gif 

Sort down and selected image 

uwc-common-Sort-Down-Selected-image

sort_down_sel.gif 

Sort up and non selected image 

uwc-common-Sort-Up-NonSelected-image

sort_up_nonsel.gif 

Sort up and selected selected image 

uwc-common-Sort-Up-Selected-image

sort_up_sel.gif 

Anchor Image 

uwc-common-To-Anchor-image

to_anchor.gif 

Subscribed Image 

uwc-common-Subscribed-image

LrlSub_1.gif 

Required Image 

uwc-common-Required-image

required.gif 

Error Message Icon 

uwc-common-Error-Message-icon

Error_Large.gif 

Warning Message Icon 

uwc-common-Warning-Message-icon

Warning_Large.gif 

Question Message Icon 

uwc-common-Question-Message-icon

Question_Large.gif 

Information Message Icon 

uwc-common-Info-Message-icon

Info_Large.gif 

Customizing Text

Communications Express allows you to customize text that is displayed on web pages. This text is both customizable and localizable. You can also configure text on a per domain basis. To customize text, you to need to change the i18n.properties file that is deployed in <domain-dir>/domain/en. The i18n.properties file in <domain-dir>/domain/en is the default file. If the deployment is configured to work with multiple domains and multiple locales, then you need to create a directory by that domain name under <domain-dir> appropriately.

To customize the text of a domain called example.com, perform the following steps.

ProcedureTo Customize Text for a Domain

Steps
  1. Create <domain-dir>/domain/example.com

  2. Copy <domain-dir>/domain/en/i18n.properties to <domain-dir>/domain/example.com/en. This would be the default path of the i18n.properties for users in example.com domain.

  3. Create directories for each supported locale such as en_US, ja, de_FR under that domain, copy i18n.properties to the domain, and change the locations accordingly

Customizing Skin

Communications Express allows you to customize the look and feel of the displayed web pages.

ProcedureTo Create a new Skin

The <skin-dir> directory contains subdirectories, which correspond to each skin defined for Communications Express. For example, to create a skin called “christmas” create a “christmas” directory under the <skin-dir> directory and do the following:

Steps
  1. Copy themes.properties under <skin-dir> directory to <skin-dir>/christmas. themes.properties file that defines the various parameters of the skin

  2. Change the locations in themes.properties to point to the customized style sheets and images.

  3. For help on various paramaters in this file, refer to Appendix D of the Communications Express Administration Guide. Look for “themes.properties” under the “Configuration Parameters Reference” section.

  4. To configure the christmas theme go to <domain-dir> and set uwc-user-attr-sunUCTheme=christmas in the uwcdomainconfig.properties file.

  5. Restart the web server to apply changes.

ProcedureTo Modify a Skin

The <skin-dir> directory contains subdirectories, which correspond to each skin defined for the Communications Express. You can also modify the properties associated with a particular skin by editing the themes.properties file for the skin.

Steps
  1. Go to the skin directory that you want to update. For example, to update the skin called “christmas” change to <skin-dir>/christmas directory.

  2. The <skin-dir>/christmas contains a file called themes.properties. This file defines the various parameters of the skin.

  3. Update the required parameter(s) in the themes.properties file.

  4. For help on various parameters in this file, refer to Appendix D of the Communications Express Administration Guide. Look for “themes.properties” under the “Configuration Parameters Reference” section.

  5. Restart the web server to apply changes.

Customizing the Login Screen for English Locale

This section describes how to modify the Communications Express Login screen shown in Figure 2–1.

You can replace the logo with a custom graphic on the Communications Express Login screen:

To modify the Communications Express Login Screen, you need to edit <skin-dir>/themes.properties file. The relevant .jsp file is login.jsp.

Figure 2–1 Communications Express Login Screen.

Communications Express Login Screen

Replacing the Logo With a Custom Graphic

To replace the default Communications Express logo with a custom logo:

Figure 2–2 Communications ExpressLogo and Link

The Sun Logo.

Example—Logo Modification

The example shown in Figure 2–3 replaces the Sun logo with a custom logo having different dimensions.

Figure 2–3 Example Corner Logo

Replacement for the default Sun Logo with a logo with different
dimensions.

Figure 2–4 Login Screen with Customized Logo

The Customized Login Screen

Changing the Title Text

Figure 2–5 Communications Express Title Text

The default title text

To change the title text for Communications Express:

Customizing the Banner

You can modify the left image and the right image in the banner. These images show the banner before and after customization.

Figure 2–6 Left Banner Image Before Customization

Left banner image before customization

Figure 2–7 Customized Left Banner Image

The customized banner consists of the customized logo at the
left hand side followed by the other default left banner items.

Figure 2–8 Right Banner Image Before Customization

Right banner before Customization

Figure 2–9 Customized Right Banner Image

Customized left banner Image. The default Sun Logo is now replaced
by the customized logo

Customizing the Application Bar

You can modify the application bar by editing the CalApplBarNormal.jsp file located at <calclient-dir>/CalApplBarNormal.jsp

By default, the order in which the application tab appear, provided all services are enabled, is 'Mail’,’Calendar', 'Address Book' and 'Options'. This order can be changed to suit your requirements.

Figure 2–10 Default application tab order

Figure showing the default application tab order: Mail, Calender,
and Address Book and Options tab to configure these components.

Example 2–1 shows the default code that displays the default application tab order.


Example 2–1 Code for customizing the Application tab order


<td class="Tab1Gutter">
    <table border="0" cellspacing="0" cellpadding="0" class="Tab1Tbl">
   <tr>
  <td colspan="12">
<img src="../uwc/images/spacer.gif" width="1" height="6" alt=""></td>
</tr> <tr>
	<jato:content name="MailTab">
 <td class="Tab1Gutter" colspan="3">
<img src="../uwc/images/spacer.gif" width="1" height="3" alt=""></td>
</jato:content>
 <td rowspan="3" class="Tab1Sel">
 <div class="Tab1Sel"><span class="Tab1LblSel" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-Calendar", "Calendar") %>">
<%= getLocalizedLabel(session, "uwc-calclient-toolbar-Calendar", 
"Calendar") %></span></div>  </td>
 <td rowspan="3" class="Tab1Sel">
 <img src="../uwc/images/spacer.gif" width="10" height="3" alt=""></td>
 <td class="Tab1Gutter" colspan="7">
 <img src="../uwc/images/spacer.gif" width="1" height="3" alt=""></td>
   </tr>
    <tr><jato:content name="MailTab">
  <td class="Tab1NotSel">
  <div class="Tab1NotSel">
<a href="<%= getContextURI(request) %>/mailclient/Mail"
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-Mail", "Mail") %>"
class="Tab1LblNormal" onmouseover="status='Mail'; return true;" 
onmouseout="status=';'">
<%= getLocalizedLabel(session, "uwc-calclient-toolbar-Mail", 
"Mail") %></a></div> </td>
 <td class="Tab1NotSel"><img src="../uwc/images/spacer.gif" 
width="10" height="1" alt=""></td>
 <td class="Tab1Gutter"><img src="../uwc/images/spacer.gif" 
  width="3" height="1" alt=""></td>
	</jato:content>
  <td class="Tab1Gutter">
<img src="../uwc/images/spacer.gif" width="3" height="1" 	alt=""></td>
  <td class="Tab1NotSel" nowrap>
<div class="Tab1NotSel"><a href="<%= getContextURI(request)%>
		/abclient/AddressBook" 
 title="<%= getLocalizedLabel(session,
"uwc-calclient-toolbar-tooltip-AddressBook",	"Address Book") %>" 
class="Tab1LblNormal"  onmouseover="status='Address Book'; return true;" 
onmouseout="status=';'">
<%= getLocalizedLabel(session, "uwc-calclient-toolbar-AddressBook", 
"Address Book") %></a></div>
 </td><td class="Tab1NotSel">
<img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>
 <td class="Tab1Gutter">	
<img src="../uwc/images/spacer.gif" width="3" height="1" 
alt=""></td> <td class="Tab1NotSel">
<div class="Tab1NotSel">	  <a href="<%= getContextURI(request) %>
/base/CalendarPreferences" title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-Options", "Options") %>" 
class="Tab1LblNormal" onmouseover="status='Options'; 
return true;" onmouseout="status=';'">
<%= getLocalizedLabel(session, 	
"uwc-calclient-toolbar-Options", "Options") 
%></a></div></td>	<td class="Tab1NotSel">
<img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>
<td class="Tab1Gutter">
<img src="../uwc/images/spacer.gif" width="3" 
	height="1" alt=""></td></tr><tr><td colspan="3" class="Tab1Gutter">
<img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
 <td colspan="7" class="Tab1Gutter">
<img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
 </tr>
 </table>
</td>
            

The application tab order can be customized to display in the order, Address Book, Mail, Calendar and Options.

Figure 2–11 Changing the application tab order to display Address Book, Mail, Calendar and Options

Figure showing the changed order of the application tabs.

To change the order of Application tabs for example 'Address Book', 'Mail', 'Calendar', 'Options' re-arrange the code shown in Example 2–2 to the following:


Example 2–2 Customizing the order of the application tabs.


<td class="Tab1Gutter">
<table border="0" cellspacing="0" cellpadding="0" class="Tab1Tbl">
<tr>
<td colspan="12"><img src="../uwc/images/spacer.gif" width="1" 
height="6" alt=""></td></tr><tr>  <td class="Tab1Gutter">
	<img src="../uwc/images/spacer.gif" width="3" height="1" alt=""></td>
          <td class="Tab1NotSel" nowrap> <div class="Tab1NotSel">
<a href="<%= getContextURI(request) %>/abclient/AddressBook" 
 title="<%= getLocalizedLabel(session, 
				"uwc-calclient-toolbar-tooltip-AddressBook", 
"Address Book") %>" 
	class="Tab1LblNormal" 
onmouseover="status='Address Book'; return true;" 
onmouseout="status=';'">
<%= getLocalizedLabel(session, "uwc-calclient-toolbar-AddressBook",
	"Address Book") %></a></div>
</td>

<jato:content name="MailTab">
 <td class="Tab1NotSel">
<div class="Tab1NotSel">
<a href="<%= getContextURI(request) %>/mailclient/Mail" 
title="<%= getLocalizedLabel(session, 
			"uwc-calclient-toolbar-tooltip-Mail",
			"Mail") %>"
class="Tab1LblNormal" onmouseover="status='Mail'; return true;" 
	onmouseout="status=';'">
<%=getLocalizedLabel(session, "uwc-calclient-toolbar-Mail", "Mail") %>
</a></div>
 </td><td class="Tab1NotSel"><img src="../uwc/images/spacer.gif" 
width="10" height="1" alt=""></td>
 <td class="Tab1Gutter"><img src="../uwc/images/spacer.gif"
width="3" height="1" alt=""></td>
</jato:content>
<jato:content name="MailTab">
  <td class="Tab1Gutter" colspan="3">
<img src="../uwc/images/spacer.gif" width="1" height="3" alt=""></td>
</jato:content> <td rowspan="3" class="Tab1Sel">
  <div class="Tab1Sel"><span class="Tab1LblSel" 
title="<%= getLocalizedLabel(session, 
						"uwc-calclient-toolbar-tooltip-Calendar",
"Calendar") %>">
	<%= getLocalizedLabel(session, "uwc-calclient-toolbar-Calendar", 
							"Calendar") %>
</span></div>
 </td><td rowspan="3" class="Tab1Sel">
<img src="../uwc/images/spacer.gif" width="10" height="3" alt=""></td>
  <td class="Tab1Gutter" colspan="7">
	<img src="../uwc/images/spacer.gif" width="1" height="3" alt=""></td>
 </tr> <tr>
 <td class="Tab1NotSel">
<img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>
 <td class="Tab1Gutter">
<img src="../uwc/images/spacer.gif" width="3" height="1" alt=""></td>
 <td class="Tab1NotSel">
 <div class="Tab1NotSel">
<a href="<%= getContextURI(request) %>/base/CalendarPreferences" 
title="<%= getLocalizedLabel(session, 
"uwc-calclient-toolbar-tooltip-Options", "Options") %>" 
class="Tab1LblNormal" onmouseover="status='Options'; 
return true;" onmouseout="status=';'">
	<%= getLocalizedLabel(session, "uwc-calclient-toolbar-Options", 
"Options") %></a></div>
 </td> <td class="Tab1NotSel">
<img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>
 <td class="Tab1Gutter">
<img src="../uwc/images/spacer.gif" width="3" height="1" alt=""></td>
 </tr>
 <tr>
<td colspan="3" class="Tab1Gutter">
<img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
 <td colspan="7" class="Tab1Gutter">
<img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
  </tr>
 </table></td>