returnActionListenerタグは、アクション・ソース(<commandButton>、<commandLink>など)によってダイアログまたはプロセスから値を返せるようにする宣言的方法です。これは、AdfFacesContextでreturnFromDialogメソッドをコールします。このタグは、ADF FacesコマンドおよびJSF標準タグとともに使用できます。一般的にこれは、標準的なActionSourceインタフェースを実装する、すべてのコンポーネントとともに使用できます。
この例では、表を持つダイアログ・ページを表示します。表には、クリックするとダイアログを閉じ、指定の従業員番号(Empno)を返す「Select」ボタンがあります。またクリックすると、値を返さずにダイアログを閉じる「Cancel」ボタンもあります。
<source> <af:table var="row" value="#{....}"> ... <af:column headerText="Employee Number"> <outputText value="#{row.Empno}"/> </af:column> <af:column headerText="Employee Name"> <outputText value="#{row.Ename}"/> </af:column> <af:column headerText="Select and Close"> <af:commandButton text="Select"> <af:returnActionListener value="#{row.Empno}"/> </af:commandButton> </af:column> </af:table> <af:commandButton text="Cancel"> <af:returnActionListener/> </af:commandButton>
</source>
名前 | 型 | ELのサポート | 説明 |
---|---|---|---|
value | Object | あり | ダイアログ/プロセス結果として返す値。これはEL式または定数値にできます。 |