ADF Facesのaf:returnActionListener
タグは、標準のActionSource
インタフェースを実装するコンポーネントで使用できます。
このaf:returnActionListener
タグには、アクション・ソース(commandButton
、commandLink
など)がダイアログまたはプロセスから値を戻す宣言方式が用意されています。value
属性はEL式または定数値にできます。
たとえば、「Select」ボタンがあるダイアログ・ページの場合は、次のようになります。
<af:commandButton text="Select" ..>
<af:returnActionListener value="#{mybackingbean.table1.selectedRowData.Empno}"/>
</af:commandButton>
ここで、mybackingbean
は表のバッキングBean、table1
はその表を取得するバッキングBeanのプロパティです。
「Select」ボタンがtableSelectOne
にある場合は、次のようになります。
<af:tableSelectOne>
<af:commandButton text="Select">
<af:returnActionListener value="#{row.Empno}"/>
</af:commandButton>
</af:tableSelectOne>
また、af:returnActionListener
タグは、処理を取り消し、値を戻さずにダイアログ・ウィンドウを閉じる際にも使用できます。たとえば、「Cancel」ボタンがダイアログ・ページにある場合は、次のようになります。
<af:commandButton text="Cancel" ..>
<af:returnActionListener/>
</af:commandButton >
ADF Facesコマンド・コンポーネントからのダイアログの起動について
Copyright © 1997, 2007, Oracle. All rights reserved.