Siebel Tools Reference > Special Behavior Supported by Templates > Image Support >

Using Icons for Field Values


SWE supports a feature to render control/list column field values as icons. A repository object called "Icon Map" supports this. Each icon map object is a collection of objects called "Icons." An icon uses a bitmap object to define the image for the icon. Each icon within an icon map corresponds to a field value. Controls/List Columns have a attribute called "Icon Map" that can be set to the icon map object to be used for rendering the field values. Configuring and using these objects is explained below in detail.

For example, consider rendering the "Status" list column on the "Activity List Applet" using icons. The status field can have values "Not Started," "In Progress," and "Done." Other values include notstarted.gif, inprogress.gif, and done.gif as the corresponding iconic image files.

NOTE:  If you want to use custom icons in a list applet, you must size them in accordance with the list applet's row font size. For example, when using an 8-pt font (standard for Siebel eBusiness Applications), icons should be 23 pixels in width x 14 pixels in height.

If you change the list applet row font size dynamically or place an icon larger than 23 x 14 in a row, the list applet rows will be scrambled.

To render a field using image files

  1. Create a new Bitmap Category, for example, "Activity Status Icons," to contain the bitmaps used for these icons.
  2. Within this category, create bitmaps "NOTSTARTED", "INPROGRESS" and "DONE." These bitmaps should be configured to use the Web images notstarted.gif, inprogress.gif, and done.gif.

    The Bitmap object in Tools has been extended to support image formats used in Web Applications like jpeg and gif. The Bitmap object has a new attribute called "File Name." To configure a gif or a jpeg image in Tools, create a new Bitmap object and set its "File Name" attribute to the file name of the image file. When setting the image name assume that the images will be published in a folder named "images" under the public folder of the application. For images that are published within subfolders in the image folder, include the subfolder in the image name.

    For example:

  3. Create a new "Icon Map" object named, for example, "Activity Status."
  4. Create "Icon" objects as child objects of the "Activity Status" icon map. Create one icon object for each field value that the status field can have. Set the "Name" attribute of the icon as the field value. Set the "Bitmap Category" and "Bitmap" attributes of the icon to the bitmap you want to show for the field value. Thus you will create the following icons in this example:
  5. Name
    Bitmap Category
    Bitmap
    Not Started
    Activity Status Icons
    NOT STARTED
    In Progress
    Activity Status Icons
    INPROGRESS
    Done
    Activity Status Icons
    DONE

  6. Set the "Icon Map" attribute of the "Status" list column of the "Activity List Applet" to the icon map "Activity Status Icons."

The procedure is the same with control field values.

SWE renders the image corresponding to the bitmap when the field value matches one of the icons defined.

If you create an icon named "Default" in a Icon Map object in tools and if the field value does not match any of the icons, then the icon named "Default" is used for the field. This feature is used to create an icon used with fields that could contain different values (for example, URLs). In this case, you would still set the HTML Type property of the field to be "URL" and its IconMap property to an IconMap object that contains only one icon named "Default." If the field value does not match any of the icons and a "Default" icon is not defined, then the field value itself is rendered.

For more information about Icon Maps, see Icon Maps.


 Siebel Tools Reference, Version 7.5, Rev. A 
 Published: 18 April 2003