multiImage - マルチイメージ出力

選択値に応じて、コレクションから 1 つのアイコンを表示します。

カテゴリ

拡張ライブラリ

構文

<xe:multiImage attributes>content</xe:multiImage>
表 1. 必須プロパティ
プロパティ 説明
id デフォルトは multiImage1multiImage2 などです。
icons 各要素のタイプが xe:iconEntry のコレクションを指定します。アイコンに選択用の名前を付けるには、selectedValue を指定します。アイコンの画像ファイルを識別するには、url を指定します。
value アイコンのコレクションの selectedValue プロパティと突き合わせて、表示するアイコンを指定します。
ismap アイコンをサーバーサイドのイメージマップとして使用するかどうかを指定します。このイメージは、href 属性を持つ要素内になければなりません。デフォルトは false。
longdesc イメージの詳細説明を示す URI を指定します。
url イメージリソースのパスを指定します。 このプロパティは、value の別名です。
usemap クライアントサイドのイメージマップの名前を指定します。
表 2. すべてのプロパティ
カテゴリ プロパティ
アクセシビリティ altroletitle
basics attrsbindingdiriconsidismaplangloadedlongdescrenderedrendererTypeurlusemapvalue
イベント onBluronClickonCloseonDblClickonFocusonKeyDownonKeyPressonKeyUponMouseDownonMouseEnteronMouseLeaveonMouseMoveonMouseOutonMouseOveronMouseUp
format heightwidth
styling disableThemestylestyleClassthemeId

使用法

value プロパティは、ユーザーが選択する別のコントロールの値にすることができます。この値を取得するには、getComponent('controlid').value を使用します。

以下のマルチイメージコントロールは、コンボボックスでの選択内容に応じて、3 つのイメージのいずれかを表示します。
<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>