icons - Icons

Specifies a collection of icons for the purpose of selecting one.

Category

basics

Syntax

<xe:this.icons>
	<xe:iconEntry attributes>content</xe:iconEntry>
	...
</xe:this.icons>

Usage

In Design mode, click All Properties and look for icons under basics.
Each icon is defined by an object of type xe:iconEntry with properties as follows:
Table 1. xe:iconEntry properties
Property Description
alt="text" Alternative text if the image cannot be displayed.
loaded="true|false" Whether the tag instance should be created when the page is loading. Defaults to true.
selected="true|false" Whether the icon should be selected. You might want to compute this as false, for example, if selectedValue is missing.
selectedValue="name" Gives the icon a name for selection purposes.
style="style,..." Space-separated list of CSS styles applied when the control is rendered.
styleClass="class,..." Space-separated list of CSS style classes applied when the control is rendered.
title="title" Advisory title.
url="url" URL of the image.

Examples

This multi-image control displays one of three images depending on the selection made in a combo box.
<xe:multiImage id="multiImage1"
	value="#{javascript:return getComponent('djComboBox1').value}">
	<xe:this.icons>
		<xe:iconEntry url="/binary.gif" alt="binary"
			selectedValue="binary">
		</xe:iconEntry>
		<xe:iconEntry url="/folder.gif" alt="folder"
			selectedValue="folder">
		</xe:iconEntry>
		<xe:iconEntry url="/link.gif" alt="link"
			selectedValue="link">
		</xe:iconEntry>
	</xe:this.icons>
</xe:multiImage>
<xe:djComboBox id="djComboBox1" defaultValue="binary">
	<xp:selectItem itemLabel="binary"></xp:selectItem>
	<xp:selectItem itemLabel="folder"></xp:selectItem>
	<xp:selectItem itemLabel="link"></xp:selectItem>
	<xp:eventHandler event="onChange" submit="true"
		refreshMode="complete">
	</xp:eventHandler>
</xe:djComboBox>