<boundAttribute>要素 |
![]() |
ネームスペース: | http://xmlns.oracle.com/uix/ui |
派生元: | <ui:uinodeExtension>要素 |
グループ: | UIX Components |
要素の型: | UINode Extensions |
構文 |
![]() |
<boundAttribute
name="string"> <!-- The following child can be anything derived from the given element --> <boundValue></boundValue> </boundAttribute>
説明 |
![]() |
<boundAttribute>要素を使用すると、UINodeの属性として、より複雑なデータ・バインディングを定義できます。
<boundAttribute>は、バインドされるノードの子要素として追加する必要があります。 要素をサポートしないノードの子要素として追加できます。 データ・バインディングの指定には、ネームスペースを持つ特殊な属性をUINode要素で直接使用する、より簡潔な形式もあります。 次のように指定されたデータ・バインドがあるとします。 これは次のような属性として指定することもできます。 属性に@記号が含まれていない場合、文字列全体が現行のデータ・オブジェクトの選択キーとして使用されます。 <boundAttribute>要素ではデフォルトの属性をサポートします。 これが設定されている場合、データ・バインディングが解決できない(またはNULLを返す)ときは、デフォルト値が使用されます。 簡潔な形式でもデフォルト設定をサポートしており、単に、デフォルト値を(ネームスペースで修飾されていない)属性値として指定すれば設定できます。 これらのすべての例で、dataネームスペースがUIX Componentsのネームスペースに追加されている必要があります。
<someElement>
<boundAttribute>
<dataObject select="key" source="demo:someSource"/>
</boundAttribute>
</someElement>
<someElement data:attrName="key@demo:someSource"/>
<someElement data:attrName="keyForCurrentDataObject"/>
<someElement attrName="default" data:attrName="key@demo:someSource"/>
<parentElement xmlns:data="http://xmlns.oracle.com/uix/ui">
例 |
![]() |
<dataScope>
<provider>
<data name="ifData">
<inline conditional="false"
isTrue="If test was true."
isFalse="If test was false."/>
</data>
</provider>
<contents>
<styledText styleClass="OraInstructionText" >
<boundAttribute name="text">
<if>
<dataObject select="conditional" source="ifData"/>
<dataObject select="isTrue" source="ifData"/>
<dataObject select="isFalse" source="ifData"/>
</if>
</boundAttribute>
</styledText>
</contents>
</dataScope>