Skip Headers
Oracle® Collaboration Suite Administrator's Guide
10g Release 1 (10.1.2) for Windows or UNIX

Part Number B25490-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

14 Customizing Oracle Collaboration Suite

You can make various customizations to the logos, colors, and fonts used in various Oracle Collaboration Suite interfaces.

Customizing Default Logos

This section tells you how to customize the default logos for various components of Oracle Collaboration Suite. It contains the following topics:

Replacing the Default Logo on the Oracle Collaboration Suite Portal Home Page

You can replace the default logo on the Oracle Collaboration Suite Portal home page with a custom image of your choosing.

To replace the default logo on the Oracle Collaboration Suite Portal home page:

  1. Log in to Portal as an administrator (such as orcladmin)

  2. Select the Navigator global button

  3. Select the Page Groups tab

  4. Click the Oracle Collaboration Suite link

  5. Click the Navigation Pages link

  6. Locate "Oracle Collaboration Suite:Banner" and click the edit link next to it

  7. Locate the region containing the default Oracle Collaboration Suite logo, and select the Edit icon immediately to the left of the logo image

  8. On the Item Attributes screen, select Browse to upload a custom logo image

  9. When you have finished, select OK to save your settings.

Customizing the Oracle WebMail Logo

Follow the steps outlined below to replace the default corporate and product branding logos in Oracle WebMail with custom images. Note that these steps must be performed on all Applications tiers where Oracle WebMail is configured.

  1. Locate the directory where the Oracle WebMail logo images are stored:

    On UNIX systems:

    ORACLE_HOME/j2ee/OC4J_OCSClient/applications/UMClientApp/um_client/images
    
    

    On Windows systems:

    ORACLE_HOME\j2ee\OC4J_OCSClient\applications\UMClientApp\um_client\images
    
    
  2. Back up the default corporate and product branding logos:

    On UNIX systems:

    cp ocs_brand_header.gif ocs_brand_header.gif.backup
    cp mail_subbrand.gif mail_subbrand.gif.backup
    
    

    On Windows systems:

    copy ocs_brand_header.gif ocs_brand_header.gif.backup
    copy mail_subbrand.gif mail_subbrand.gif.backup
    
    
  3. Replace the default corporate and product branding logos with custom images (substitute actual image file names for custom_corporate_logo.gif and custom_product_logo.gif):

    On UNIX systems:

    cp custom_corporate_logo.gif ocs_brand_header.gif
    cp custom_product_logo.gif mail_subbrand.gif
    
    

    On Windows systems:

    copy custom_corporate_logo.gif ocs_brand_header.gif
    copy custom_product_logo.gif mail_subbrand.gif
    
    
  4. Another copy of the image is stored in /UMClientApp/admin/pages. You should replace this image with your custom image as well.

  5. After placing a new image, you must restart OracleAS WebCache in order for the new image to be loaded into the cache. Until you restart OracleAS WebCache, clients accessing the image will continue to load the cached, older version of the image.

Customizing the Oracle Calendar Logo

Follow the steps outlined below to replace the default corporate and product branding logos in the Oracle Calendar Web client with custom images. Note that these steps must be performed on all Applications tiers where Oracle Calendar is configured.

  1. Locate all directories where Oracle Calendar logo images are stored:

    On UNIX systems:

    ORACLE_HOME/ocas/htdocs/ocas/american/banners
    ORACLE_HOME/ocas/htdocs/ocas/brazilian_portuguese/banners
    ORACLE_HOME/ocas/htdocs/ocas/danish/banners
    ...
    ORACLE_HOME/ocas/htdocs/ocwc/american/banners
    ORACLE_HOME/ocas/htdocs/ocwc/brazilian_portuguese/banners
    ORACLE_HOME/ocas/htdocs/ocwc/danish/banners
    ...
    
    

    On Windows systems:

    ORACLE_HOME\ocas\htdocs\ocas\american\banners
    ORACLE_HOME\ocas\htdocs\ocas\brazilian_portuguese\banners
    ORACLE_HOME\ocas\htdocs\ocas\danish\banners
    ...
    ORACLE_HOME\ocas\htdocs\ocwc\american\banners
    ORACLE_HOME\ocas\htdocs\ocwc\brazilian_portuguese\banners
    ORACLE_HOME\ocas\htdocs\ocwc\danish\banners
    ...
    
    
  2. In each directory corresponding to the language(s) for which the logo is to be customized, back up the default branding logo:

    On UNIX systems:

    cp calendar_subbrand.gif calendar_subbrand.gif.backup
    
    

    On Windows systems:

    copy calendar_subbrand.gif calendar_subbrand.gif.backup
    
    
  3. Replace the default logo with a custom image (substitute actual image file name for custom_product_logo.gif):

    On UNIX systems:

    cp custom_product_logo.gif calendar_subbrand.gif
    
    

    On Windows systems:

    copy custom_product_logo.gif calendar_subbrand.gif
    
    

Customizing the Oracle Mobile Collaboration & Voice Logo

Follow the steps outlined below to replace the default corporate and product branding logos in the Oracle Mobile Collaboration & Voice setup pages with custom images. Note that these steps must be performed on all Applications tiers where Oracle Mobile Collaboration & Voice is configured.

  1. Locate the directory where the Oracle Mobile Collaboration & Voice setup images are stored:

    On UNIX systems:

    ORACLE_HOME/j2ee/OC4J_Portal/applications/marconi/marconi-web/images
    
    

    On Windows systems:

    ORACLE_HOME\j2ee\OC4J_Portal\applications\marconi\marconi-web\images
    
    
  2. Back up the default logo:

    On UNIX systems:

    cp ocs_brand_header.gif ocs_brand_header.gif.backup
    
    

    On Windows systems:

    copy ocs_brand_header.gif ocs_brand_header.gif.backup
    
    
  3. Replace the default logo with a custom image (substitute the actual image file name for custom_corporate_logo.gif):

    On UNIX systems:

    cp custom_corporate_logo.gif ocs_brand_header.gif
    
    

    On Windows systems:

    copy custom_corporate_logo.gif ocs_brand_header.gif
    
    

Customizing the Oracle Discussions Logo

Follow the steps outlined below to replace the default logo shown in the Oracle Discussions Web client with custom images. Note that these steps must be performed on all Applications tiers where Oracle Mobile Collaboration & Voice is configured.

On UNIX systems:

ORACLE_HOME/j2ee/OC4J_OCSClient/applications/discussions/webui/ocs_logo.gif

On Windows systems:

ORACLE_HOME\j2ee\OC4J_OCSClient\applications\discussions\webui\ocs_logo.gif

  1. Locate the directory where the Oracle Discussions image is stored:

    On UNIX systems:

    ORACLE_HOME/j2ee/OC4J_OCSClient/applications/discussions/webui/
    
    

    On Windows systems:

    ORACLE_HOME\j2ee\OC4J_OCSClient\applications\discussions\webui\
    
    
  2. Back up the default logo:

    On UNIX systems:

    cp ocs_logo.gif ocs_logo.gif.backup
    
    

    On Windows systems:

    copy ocs_logo.gif ocs_logo.gif.backup
    
    
  3. Replace the default logo with a custom image (substitute the actual image file name for ocs_logo.gif):

    On UNIX systems:

    cp custom_corporate_logo.gif ocs_logo.gif
    
    

    On Windows systems:

    copy custom_corporate_logo.gif ocs_logo.gif
    
    

Customizing Colors and Fonts

This section tells you how to customize the colors and fonts of various Oracle Collaboration Suite components. It contains the following topics:

Changing the Default Colors and Fonts on the Oracle Collaboration Suite Portal Home Page

To change default colors and fonts on the Portal home page, follow these instructions:

  1. Log in to Portal as an administrator (e.g. orcladmin)

  2. Click the Builder global button

  3. Click the Navigator global button

  4. Locate the Oracle Collaboration Suite page group, and click the Contents link.

  5. Click the Styles link

  6. Locate the OCSHomePageStyle style, and click the Edit link

  7. Use the Portal style editor tool to customize the appearance of the Portal home page:

    1. Use the Style Element Type drop-down list to view style settings for various style elements (Common, Portlets, Tabs, and Items)

    2. Within each style element type, use the Style Element Properties tool to customize style properties

    3. Click the Apply button to apply your changes and preview the result in the Preview section

Customizing Oracle WebMail Colors and Fonts

To change the default colors and fonts in Oracle WebMail, change the style properties in the appropriate .xss XML stylesheet files.

To change the administration UI, edit the following file:

ORACLE_HOME/j2ee/OC4J_OCSClient/applications/VMAdminApp/vmadmin_client/cabo/styles/ocs.xss

To change the end-user UI, edit the following file:

ORACLE_HOME/j2ee/OC4J_OCSClient/applications/UMClientApp/um_client/cabo/styles/ocs.xss

Customizing Oracle Calendar Colors and Fonts

To change the default colors and fonts in Oracle Calendar, change the style properties in the OCAS and OCWC .css Cascading Style Sheet files. Make your changes to all of the files corresponding to the languages which your users will use.

For OCAS, change the style properties in the following files:

ORACLE_HOME/ocas/htdocs/ocas/american/stylesheet/swcdefault.css
ORACLE_HOME/ocas/htdocs/ocas/french/stylesheet/swcdefault.css
ORACLE_HOME/ocas/htdocs/ocas/german/stylesheet/swcdefault.css
...

For OCWC, change the style properties in the following files:

ORACLE_HOME/ocwc/htdocs/ocas/american/stylesheet/swcdefault.css
ORACLE_HOME/ocwc/htdocs/ocas/french/stylesheet/swcdefault.css
ORACLE_HOME/ocwc/htdocs/ocas/german/stylesheet/swcdefault.css
...

Customizing Oracle Mobile Collaboration & Voice Colors and Fonts

To change the default colors and fonts in the Oracle Mobile Collaboration & Voice Web client, change the style properties in the following .xss XML stylesheet files.

For the multi-channel application setup pages:

ORACLE_HOME/j2ee/OC4J_Wireless/applications/modules/modules-web/cabo/styles/blaf.xss

For the Web client common pages:

ORACLE_HOME/j2ee/OC4J_Portal/applications/webclient-common/webclient-common-web/cabo/styles/blaf.xss

For the Oracle Mobile Collaboration & Voice setup wizard pages:

ORACLE_HOME/j2ee/OC4J_Portal/applications/marconi/marconi-web/cabo/styles/blaf.xss

For the Oracle Mobile Collaboration & Voice administrative UI:

ORACLE_HOME/j2ee/OC4J_Portal/applications/webtool/webtool-web/cabo/styles/blaf.xss

Customizing Oracle Workspaces Colors and Fonts

To change the default colors and fonts in the Oracle Workspaces Web client, change the style properties in the .xss XML stylesheet file.

By default, the file ORACLE_HOME/j2ee/OC4J_OCSClient/applications/workspaces/workspaces/styles/workspaces.xss is used.

The file ORACLE_HOME/j2ee/OC4J_OCSClient/applications/workspaces/workspaces/WEB-INF/uix-config.xml points Oracle Workspaces to the .xss file. Alternatively, you can create a new .xss file and modify uix-config.xml to point to this new file.

Customizing Oracle Discussions Colors and Fonts

To change the default colors and fonts in the Oracle Discussions Web client, change the style properties in the .xss XML stylesheet file.

By default, the file ORACLE_HOME/j2ee/OC4J_OCSClient/applications/discussions/webui/cabo/styles/ocs.xss is used.

The file ORACLE_HOME/j2ee/OC4J_OCSClient/applications/discussions/webui/cabo/WEB-INF/uix-config.xml points Oracle Discussions to the .xss file. Alternatively, you can create a new .xss file and modify uix-config.xml to point to this new file.

Changing the Look and Feel of the Provisioning Console

By default, the Oracle Internet Directory Provisioning Console and its user version, the Self-Service Console, do not have the same look and feel as other Oracle Collaboration Suite components.

In order for the Provisioning Console to have same look and feel as that of other Oracle Collaboration Suite components, you need to change the stylesheet that it is using by performing the following procedure:

  1. On the Infrastructure hosting Oracle Internet Directory, cd to:

    ORACLE_HOME/j2ee/OC4J_SECURITY/applications/oiddas/ui/WEB-INF
    
    
  2. Copy the uix-config.xml file to uix-config.xml.ocs:

    mv uix-config.xml uix-config.xml.ocs
    
    
  3. Restart Oracle Delegated Administration Services:

    ORACLE_HOME/opmn/bin/opmnctl stopproc process-type=OC4J_SECURITY
    ORACLE_HOME/opmn/bin/opmnctl startproc process-type=OC4J_SECURITY
    
    

Customizing Oracle Content Services

Although you can not customize the Oracle Content Services Web interface, you can build your own custom interface and integrate it using the Oracle Content Services Web services. See Oracle Content Services Application Developer's Guide for more information about using the Oracle Content Services Web services.

Customizing Oracle Real-Time Collaboration

Oracle Real-Time Collaboration offers a number of different tools that administrators can use to customize the appearance and behavior of Oracle Real-Time Collaboration suite components and user interfaces.

You can customize the Oracle Real-Time Collaboration Web client used to download the Oracle Web Conferencing or Oracle Messenger consoles, schedule conferences, view archives of conferences or messages, and perform administrative tasks. You can change the appearance of the home page, or modify what features are available to users. Users can also change their own preferences for these web pages.

You can also customize the Oracle Web Conferencing console used to participate in conferences. You can control what features are available to users, such as whether users can share documents or use an electronic white board during a conference. Users can also change their preferences for the console behavior.

You can do any of the following to customize the Oracle Real-Time Collaboration system:

Customizing and Extending Oracle Web Access Client

Oracle Web Access Client is highly customizable and extendable. The following topics provide a broad outline of the options available for custimizing Oracle Web Access Client. This section contains the following topics:

General Notes on Customizing Oracle Web Access Client

To improve client side performance, Oracle Web Access Client allows users' browsers to cache most of the required files, including ones that you might want to customize. If you make any customizations as described in this document, it is likely that any users who accessed Oracle Web Access Client before you made customizations will have cached un-customized versions of files in their browser. Thus they will not see any of the new customizations until they clear their browser cache.

To partially avoid this, Oracle recommends that you complete creating your new skins or menu sets before you deploy them, so that users can never access anything but the final versions.

Customizing Oracle Web Access Client Skins

Oracle Web Access Client comes with default skins. A skin is a set of customizations that go together, under a single name, and apply look-and-feel changes such as font, color, and position of buttons, all at once to the Oracle Web Access Client interface. In a sense, a skin changes the surface of Oracle Web Access Client, without affecting the inner workings.

Setup

To begin creating a custom skin, you should start by copying an existing skin that you will then edit. You can copy the sample custom skin that comes in the installation from ORACLE_HOME/ocsclient/skins/Modern/ , or you can use any other custom skin that is already in ORACLE_HOME/ocsclient/skins/ . For example, if you were creating a new skin called MySkin, you should create a directory ORACLE_HOME/ocsclient/skins/MySkin/ , which should contain the file styles.css and the directory images/ (which in turn will contain several image files).

Note: you should not name your custom skins "Traditional", as this is the name of the pre-installed skin that comes with Oracle Web Access Client (and cannot be deleted or modified).

Customizing

styles.css

You can change the style sheet used to render the Oracle Web Access Client. Use your favorite text editor. The class names used in the styles.css file are all in English and descriptive of the situation in which they are used. If you're not sure in what situation a class is used, edit it, and try out the client to see what was affected by your change.

The easiest changes to make will be in the colors used throughout the style sheet. (It is helpful to use your editor's "find/replace" feature to replace all occurrences of a color with another.) Be careful when changing size quantities such as font size, margin, border, or padding, because in some cases you might not leave enough space for the UI components or text labels to be fully displayed.

Icon Images

You can modify any of the icons in the images/ directory. Use any graphics editor, as long as it can output the same formats that the original images are in (GIF or PNG). Oracle recommends that you keep the dimensions of each icon the same as the original images. In most cases images will be resized when rendered in the browser window.

One exception is the file branding.gif. This image will be displayed on the bottom left of the window, and is an opportunity for you to display a company logo. The image should be tall and narrow so that it fits that area well. In the Traditional skin this image is transparent, so you will not see a logo at all in the default client.

Deployment

In order to make your new custom skin available to users, start Oracle Web Access Client using Oracle Collaboration Suite Control. Remember, if you made modifications to an existing skin, users might have to clear their browser cache in order to download the latest version.

User Configuration

You can set your new skin as the default skin using Oracle Collaboration Suite Control, from the Web Access component Home page, on the Default Settings tab. The skin you set will be the skin seen by each user who logs into Oracle Web Access Client for the fist time.

Users who have logged in at least once before you changed the default skin will not automatically be assigned the new skin. However, they will be able to switch to the new skin using the Preferences window under the Appearance section.

Customizing Oracle Web Access Client Menu Sets

A menu set is the set of commands that can be invoked by a user from the various dropdown menus on the Oracle Web Access Client menu bar. There is a default menu set, and you can create your own customized menu sets.

Setup

To begin creating a custom menu set, you should start by copying an existing menu set that you will then edit. You can copy the sample custom menu set from ORACLE_HOME/ocsclient/menus/Simplified.xml , or you can use any other custom menu set that is already in ORACLE_HOME/ocsclient/menus/. For example, if you were creating a new menu set called MyMenus, you should end up with a file ORACLE_HOME/ocsclient/menus/MyMenus.xml.


Note:

You should not name your custom menu sets "Default", as this is the name of the preinstalled menu set that comes with Oracle Web Access Client (and cannot be deleted or modified).

Customizing

You can change which items are displayed in a menu or toolbar by editing the menu set's XML file. Use any text editor or an XML editing utility.

The XML file will be validated using this DTD: ORACLE_HOME/j2ee/OC4J_OCSClient/applications/ocsclient/ocsclient-web/<version number>/menus/menu.dtd. Where <version number> refers to the version of Oracle Collaboration Suite.

Exiting Menu Items

If you copy Simplified.xml and look at it, you will see all the preinstalled existing menus. Each menu or toolbar consists of a list of menu items or toolbar items and separators. Note that menu items can be placed in toolbars but toolbar items can't be placed in menus. You can reorder the items within a menu or toolbar, but you cannot move an item out of one menu or toolbar and into another, nor make duplicates of an item. You can add separators wherever you like. You can remove a menu item or toolbar item by deleting it, commenting it out, or adding the attribute hidden="true" to the item. Caution: Do not change the items' id attributes or the menu set will not work.

Custom Menu Items

You can add custom items to any menu or toolbar. The Simplified menu set contains a sample custom menu item linking to the Oracle homepage.

The following is a sample custom item:

<CUSTOMITEM id="myCustomItemID" url="http://www.mycompany.com/mycustompage" icon="myicon.gif">

The id should be a unique alphanumeric string. This will determine what text label will be displayed on your custom item. You must create a corresponding entry in the CustomMenuBundle resource bundle (see "Customizing Oracle Web Access Client Resource Bundles" for instructions) where the translation unit's id is the same as the custom item's id, and the source/target string is what the user will see as the item's label. You must create this entry in all languages that you expect to be used by the users of your application, or else the menu item will not have a proper text label in languages for which you don't provide an entry.

The URL should be the location of a Web page to which users will be taken when they click on that menu or toolbar item. For some context menus, data about the selected item will be passed to your custom page using the URL parameters in the query string (See "Populating a Compose Window Opened from the Main Window").

The icon is optional. If present, it should be the name of an image file in the images/ directory of a skin. It can be a preexisting icon, or it can be a brand new one that you create. Be sure to add any new icons to each custom skin, or else the icon will not be displayed.


Note:

Since you can't add to the preinstalled skins, icons for custom menu items will never display unless the user chooses a custom skin, or you set a custom skin to be the default skin.

Custom Font List for the Rich Text Editor

You can modify the list of fonts that are available for users to choose from when composing text using the Rich Text Editor. Fonts can be reordered, hidden, removed, modified or added in the <FONTLIST> tag at the end of the menu.xml file. Here is an example font entry:

<FONT name="Arial" value="arial,sans-serif" style="arialFontStyle"/>

All 3 attributes are required:

  • name defines what will be displayed on the dropdown menu (the font name will be the same in all languages). If you want the menu option to be automatically selected when the cursor is at a point using this font, then the name value must be exactly the same as the font's name in the Operating System.

  • value is the HTML code that represents that font, as would be seen in a <FONT> HTML tag.

  • style is the name of a CSS class in the skin definition's styles.css file that will be used to render the font name in the dropdown menu. If that class doesn't exist in a certain skin, the font name will be rendered in the default font.

Deployment

In order to make your new custom menu set available to users, restart Oracle Web Access Client using Oracle Collaboration Suite Control. Remember, if you made modifications to an existing menu set, users might have to clear their browser cache in order to download the latest version.

User Configuration

You can set your new menu set as the default menu set using Oracle Collaboration Suite Control, from the Web Access component Home page, in the Default Settings tab. The menu set you select will be seen by each user who logs into Oracle Web Access Client for the first time.

Users cannot choose which menu set they will see.

Customizing Oracle Web Access Client Resource Bundles

Resource bundles are the various collections of text labels used throughout the Oracle Web Access Client user interface. They are translated into several different languages.

Setup

To obtain a copy of a resource bundle that you can modify, you need to use a script found at ORACLE_HOME/ocsclient/util/scripts/get_labels_xliff.pl. Make sure that the environment variable ORACLE_HOME is properly set for this script to run successfully.

The first parameter is which resource bundle you want to obtain a copy of. You can get all of them by passing -allbundles , or you can get a single one by passing -bundle BundleName , where BundleName is one of the following: SharedBundle, CalendarBundle, CharsetNameResourceBundle, FilesBundle, MailBundle, PeopleBundle, PreferencesBundle, SGTBundle, CustomMenuBundle.

The second parameter is which language translations you want to obtain a copy of. You can get all of them by passing -alllangs , or you can get a single one by passing -lang LangID , where LangID is the language code (such as en for English, or optionally appended with a country code for a specific country's version of the language, such as. fr_CA for Canadian French).

The files you request will be saved in the XLIFF format in ORACLE_HOME/ocsclient/labels/ .

Customizing

The XLIFF format is an XML format used for holding translatable strings. You can edit the generated XLIFF files with a text editor, XML editing utility, or an XLIFF editor such as EvilTrans (https://sourceforge.net/projects/eviltrans/) or Heartsome (http://www.heartsome.net/EN/xlfedit.html).

Each <trans-unit> element in an XLIFF file represents a text label in the user interface. The id must not be modified (it may appear encoded because it matches the compiled application). The actual text label being displayed is the content of the <target> element in all languages except English, where it is in the <source> tag instead.

If you created a custom menu item (See "Customizing Oracle Web Access Client Menu Sets") you will need to add a new <trans-unit> inside the CustomMenuBundle. Make a copy of an existing one and edit its id, <source> and <target> accordingly.

Deployment

In order to make your new resource bundles available to users, estart Oracle Web Access Client using Oracle Collaboration Suite Control. Remember, users might have to clear their browser cache in order to download the latest version.

User Configuration

There is no configuration required for users to choose custom resources. If you modify any labels in a certain language, all users using Oracle Web Access Client in that language will automatically use your custom labels.

Popping Up Oracle Web Access Client Windows

Oracle Web Access Client is engineered to work in 'chromeless' browser windows. 'Chromeless' means a browser window with the normal menus, toolbar and other controls hidden. (This is mainly to discourage the user from using things like the back or refresh buttons, typing a URL directly in the address bar, or bookmarking.) In order to open up chromeless browser windows, Oracle Web Access Client provides JavaScript APIs.

To use the APIs to open an Oracle Web Access Client window directly from any Web page, include the following library:

<script src="http://hostname:port/ocsclient/popupLibrary">

This library provides the following entry points:

function ocsIcPopupMainWindow(baseURL, isAccessible)
function ocsIcPopupComposeWindow(baseURL, isAccessible)
function ocsIcPopupViewWindow(baseURL, uid, isAccessible)
function ocsIcPopupContactWindow(baseURL, searchString, isAccessible)

For all functions, baseURL should be the root URL of the Oracle Web Access Client application, such as: http://hostname:port/ocsclient/.

isAccessible is an optional parameter; if you set it to true it will turn on Accessibility mode.

For ocsIcPopupViewWindow , uid should be the ID of the containing folder and message to be opened, such as INBOX/100 . (This is the same ID you would find in the URL for opening a message in Oracle WebMail.) If the message with that ID is a draft or template, a compose window will open for the user to modify or send that draft or template.For ocsIcPopupContactWindow , searchString should be a string that will be matched against name/e-mail data in Oracle Internet Directory and My Address Book. If more than one match is found, a dialog box will prompt the user to select the desired contact.

You can call these functions from within a block of JavaScript in your page, or you can make them execute when the user clicks on a link with HTML code such as:

<a href="javascript:ocsIcPopupMainWindow('http://hostname:port/ocsclient/')">
Launch Web Access</a>

When the window pops up, if the user isn't yet authenticated (such as through OracleAS Single Sign-On) it will show the login page. Otherwise it will show the appropriate UI.

Extended Composer API

There is a fourth entry point provided by the above library. It is used to pop up a Compose window which already has some fields populated:

function ocsIcPopupAPI(baseURL, params, isAccessible)

In this case, params is a "bag", an object whose fields represent the parameters to be passed with which to populate the compose window. It can be defined in the following ways:

var bag = {};
bag.api_To = "username@domain.com";
bag.api_Subject = "Hello";

or:

var bag = {};
bag["api_To"] = "username@domain.com";
bag["api_Subject"] = "Hello";

or declared inline:

ocsIcPopupAPI( http://hostname:port/ocsclient/
              {api_To:"username@domain.com", api_Subject:"Hello"} );

Table 14-1 shows the valid parameters for the extended composer API.

Table 14-1 Extended Composer API Parameters

Parameter Description

api_Type(String)

"NEW" for a blank composer (the default). "REPLY" , "REPLY_ALL" or "FORWARD" will set up the composer as if the corresponding function had been applied to the messages passed in using api_UIDArray.

api_UIDArray(Array of String)

Array of message identifiers (formatted as in ocsIcPopupViewWindow, such as ["INBOX/100","INBOX/101"] ). Should contain only one item for "REPLY" or "REPLY_ALL" , can contain more for "FORWARD".

api_To(String

A string of e-mail addresses to be placed in the to: field of the composer. It is appended to any addresses that are already there in the case of this being a reply or forward.

api_Cc(String)

A string of e-mail addresses to be placed in the cc: field of the composer. It is appended to any addresses that are already there in the case of this being a reply or forward.

api_Bcc(String)

A string of e-mail addresses to be placed in the bcc: field of the composer. It is appended to any addresses that are already there in the case of this being a reply or forward.

api_Subject(String)

A string to be placed in the subject: field of the composer. It replaces the subject of the original message in the case of this being a reply or forward.

api_Body(String)

A string to be placed in the composer's Rich Text Editor. It replaces the body of the original message in the case of this being a reply or forward.

api_BodyPrepend(String)

A string to be placed in the composer's Rich Text Editor. It is placed before the body of the original message in the case of this being a reply or forward.

api_BodyAppend(String)

A string to be placed in the composer's Rich Text Editor. It is placed after the body of the original message in the case of this being a reply or forward.

api_Format(String)

"TEXT" if the body is in plain text (the default). "HTML" if the body is in HTML. "HTML_SOURCE" if the body is in HTML but it should be displayed in HTML source mode. Valid only if api_Body is specified. (Otherwise the composer is opened in HTML mode.)

api_AttachmentArray(Array of bags)

An array of bags, each representing a file to be attached. The bag has two valid parameters: api_AttachmentURL (String) is the URL where the file to be attached can be downloaded by the server; api_AttachmentName (String) is an optional name to be given to the file (if not present, the name will be derived from the URL).


The following is an example of how to define an attachment as a URL:

var bag = {};
bag["api_Type"] = "NEW";
bag["api_AttachmentArray"] = [{api_AttachmentURL: "http://server/getfile?id=1",
                               api_AttachmentName: "AttachedFile.doc"}];


Note:

The URL needs to be reachable by the host on which Oracle Collaboration Suite resides (that is, not blocked by a firewall, no authentication required, and so forth) so that the file can be downloaded.

Internally these parameters are passed in the URL's querystring. If a lot of data is being passed in, the resulting URL could be longer than the maximum length supported by the browser. To avoid this problem, this function returns the browser window object that was created. You can use this object to refer to the compose window after it has been opened and use the following method to populate it with larger amounts of data.

Detailed Population of the Composer (Attaching Files)

For the most possible flexibility in pre-populating a compose window for the user, you can create a draft message in the user's account using the JavaMail API. This will allow you to do things that the Extended Compower API does not support, such as attaching files to the message. Once the message is completely built, including being flagged as a draft (Flags.Flag.DRAFT in JavaMail), it can be opened for editing or sending in a compose window using the ocsIcPopupViewWindow entry point, described at the beginning of this section.

Populating a Compose Window Opened from the Main Window

You can create a custom menu item or toolbar button (See: "Customizing Oracle Web Access Client Menu Sets") in the compose window to open up your custom Web page, which can in turn read values from and write values back into the compose window to populate some fields.

To access the composer window, your custom page needs to refer to the JavaScript object window.opener. For protection against cross-site scripting attacks, modern browsers will not allow a page to access this object unless both the pages in the opening and opened window are hosted in the same domain. Thus, you must make sure your page is hosted on the same domain as Oracle Web Access Client.

The compose window provides the following accessor functions:

function icCustomGetData(dataKey)
function icCustomSetData(dataKey, dataVal)

dataKey is a string identifying the value you want to get or set. The valid key names for dataKey are shown in Table 14-2.

Table 14-2 dataKey Key Names

Key Name Description

"composer.to"(2-D Array of String)

An array containing each recipient in the to: field. Each recipient is another array, containing 2 strings: display name and e-mail address. Display name can be null, but e-mail address should always be a non-empty string (even if it is not an e-mail address - it might be resolved into an e-mail address later by looking up in the address book).

"composer.cc"(2-D Array of String)

An array containing each recipient in the cc: field. Recipients are in the same format described above for the to: field.

"composer.bcc"(2-D Array of String

An array containing each recipient in the bcc: field. Recipients are in the same format described above for the to: field.

"composer.subject"(String)

The string in the subject: field of the composer.

"composer.body" (String)

The string making up the body of the message. If the composer is in HTML or HTML Source mode, this will contain all the HTML tags making up the message as well.

"composer.format" (String)

"TEXT" (the default), "HTML" or "HTML_SOURCE".


The following is an example of how the 2-D array format for recipient fields works:If the user enters the following recipients in the to: field:

John Doe <jdoe@oracle.com>; jane.smith@oracle.com; Jill Smith

Then the value returned by the API for this field will be:

[["John Doe", "jdoe@oracle.com"], [null, "jane.smith@oracle.com"],
[null, "Jill Smith"]]

Even though the last item is not a well-formatted e-mail address, the text is treated as the address rather than the display name because a separate address is not present.

Note that the array returned by icCustomGetData() is a private copy generated for the extension. Altering the array will not affect the originating composer field; the field can only be modified using icCustomSetData().

Warnings

Nothing prevents users from opening multiple copies of an extension simultaneously in separate windows. Additionally, the user can still interact with the composer window directly while an extension is open. Although there is no risk of a crash, changes made in one window could overwrite changes concurrently made in another. If your organization uses extensions to modify composer fields, you should instruct users to avoid these situations.

Sample Extension Code

Example 14-1 is an example of a simple extension that lists all the current cc: recipients and offers to add jsmith@oracle.com to the list.

The extension is implemented using the following sample code:

Example 14-1 Sample Extension Code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><html><head><title>Sample</title></head>
<body>
<!-- Simple user interface -->
<b>Current CC recipients:</b>
<div id="display"></div>
<p>
<b>Add "jsmith@oracle.com"?</b>
<p>
<input type=button onclick="addJoe()" value="Add Joe">
&nbsp;&nbsp;&nbsp;
<input type=button onclick="done()" value="Cancel">
<script type="text/javascript" language="JavaScript">
// Get the current CC recipients
var cc = window.opener.icCustomGetData("composer.cc");
// Create a displayable string from the 'cc' array
var disp = document.getElementById("display");
var str = "";
for(var i=0; i<cc.length; i++) {  // for each CC recipient
    if(cc[i][0] != null) {
        // there is both a display name & email
        str += cc[i][0] + " &lt;" + cc[i][1] + "&gt;";
    } else {
        str += cc[i][1];
    }
    if(i < cc.length-1) str+=", ";
}
// Populate the "display" div with this string
disp.innerHTML = str;
// Adds jsmith and update the composer window
function addJoe() {
    cc.push( ["Joe Smith", "jsmith@oracle.com"] );
    window.opener.icCustomSetData("composer.cc", cc);
    done();
}
// Closes this extension's window
function done() {
    window.close();
}
</script>
</body>
</html>

Receiving Data using Custom Items in Context Menus

When you create a custom menu item (See "Customizing Oracle Web Access Client Menu Sets") in a context menu, data about the object that was right-clicked to open that context menu can be passed to your custom page URL using the querystring. If the URL you provided in the custom menu set's XML file already contains a query string, the data will be appended as extra URL parameters. (Make sure the parameters you added don't have the same names as the ones Oracle Web Access Client will add on).The parameters passed to the custom item's URL are:

For all context menus:

  • ocsUser: The e-mail address of the currently logged on user.

For mail message list pane context menu:

  • ocsJmaMessageId: The JMA ID of the selected message.

  • ocsJmaFolderId: The JMA folder path of the folder the selected message is in.

For mail folder tree pane context menu:

  • ocsJmaFolderId: The JMA folder path of the selected folder.

For message pane recipient context menu:

  • ocsEmailAddress: The e-mail address of the clicked-on recipient.

For contacts list pane and folder tree context menus:

  • ocsObjectUid: The internal ocsapi UID of the selected object.

For Example, The JMA folder path and message ID can be used when accessing the user's account using the IMAP protocol.


Note:

A sample demonstrating the usage of this functionality is included with Oracle Collaboration Suite 10g, Release 1, 10.1.2.2 and later versions. It is located in $ORACLE_HOME/ocsclient/extensibilitySamples/removeAttachments/. Follow the instructions in the file readme.txt if you wish to deploy it.