Use the ui:icon tag to display a theme-specific image in the
rendered HTML page. The icon attribute used in the ui:icon tag is
a key value that is mapped to a URL in theme properties file. The key is used
to look up the appropriate image source and related attributes from the current
theme. By specifying a key, you avoid the need to specify predefined constants
such as height and width. The image can also be seamlessly changed when a
different theme is selected.
Note: currently the list of icons that you can use is not publicly
supported, but the icon names are specified in the
/com/sun/rave/web/ui/suntheme/SunTheme.properties file. The names are
listed as resource keys of the format image.ICON_NAME . Use only
the part of the key that follows image. For example, if the key is
image.ALARM_CRITICAL_SMALL , you should specify
ALARM_CRITICAL_SMALL as the value of the icon attribute of the
ui:icon tag. A list of supported icon values will be published in
the near future.
HTML Elements and Layout
The rendered HTML page displays an XHTML compliant <img>
element with any applicable element attributes. Some attributes are determined
by the theme, and others can be specified through the ui:icon tag
attributes.
Theme Identifiers
TBD.
Client Side Javascript Functions
None.
Examples
Example 1: Create an icon
<ui:icon icon="ALARM_CRITICAL_SMALL" />
This will generate the following img element:
<img src="com_sun_rave_web_ui/images/alarms/alarm_critical_small.gif" height="10" width="10" />
Auto-generated component class.
Do NOT modify; all changes
will be lost!
|