コンテンツを階層で編成するノードを組み込みます。
カテゴリ
拡張ライブラリ
構文
<xe:sortLinks attributes>content</xe:sortLinks>
表 1. 必須プロパティプロパティ |
説明 |
id |
デフォルトは sortLinks1、sortLinks2 などです。 |
treeNodes |
ソートリンクに使用するノードを指定します。 |
onItemClick |
ユーザーが選択した値を context.getSubmittedValue() を使用して取得するには、このイベントを使用します。 |
使用法
このコントロールは、最新のアクセシビリティ標準に対してテストされていません。推奨されるアクセシビリティパスは、コアコントロールを使用して期待する効果を得ることです。
例
以下のソートリンクコントロールには 3 つのコンテナノードがあり、各コンテナノードには 3 つのリーフノードがあります。リーフノードをクリックすると、送信されたリーフノードの値が計算結果フィールドに表示されます。
<xp:label value="Submitted value: " id="label1"></xp:label>
<xp:text escape="true" id="computedField1"
value="#{requestScope.svalue}" style="font-weight:bold">
</xp:text>
<xe:sortLinks id="sortLinks1">
<xe:this.treeNodes>
<xe:basicContainerNode label="Container one">
<xe:this.children>
<xe:basicLeafNode
submitValue="Container one, choice one" label="Choice one">
</xe:basicLeafNode>
<xe:basicLeafNode
submitValue="Container one, choice two" label="Choice two">
</xe:basicLeafNode>
<xe:basicLeafNode
submitValue="Container one, choice three" label="Choice three">
</xe:basicLeafNode>
</xe:this.children>
</xe:basicContainerNode>
<xe:basicContainerNode label="Container two">
<xe:this.children>
<xe:basicLeafNode
submitValue="Container two, choice one" label="Choice one">
</xe:basicLeafNode>
<xe:basicLeafNode
submitValue="Container two, choice two" label="Choice two">
</xe:basicLeafNode>
<xe:basicLeafNode
submitValue="Container two, choice three" label="Choice three">
</xe:basicLeafNode>
</xe:this.children>
</xe:basicContainerNode>
<xe:basicContainerNode label="Container three">
<xe:this.children>
<xe:basicLeafNode
submitValue="Container three, choice one" label="Choice one">
</xe:basicLeafNode>
<xe:basicLeafNode
submitValue="Container three, choice two" label="Choice two">
</xe:basicLeafNode>
<xe:basicLeafNode
submitValue="Container three, choice three" label="Choice three">
</xe:basicLeafNode>
</xe:this.children>
</xe:basicContainerNode>
</xe:this.treeNodes>
<xp:eventHandler event="onItemClick" submit="true"
refreshMode="partial" refreshId="computedField1">
<xe:this.action>
<![CDATA[#{javascript:requestScope.svalue = context.getSubmittedValue()}]]>
</xe:this.action>
</xp:eventHandler>
</xe:sortLinks>