Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
11g Release 2 (11.1.2.0.0)

E17491-02

<af:returnActionListener>

returnActionListener return action listener returnAction returnaction


The returnActionListener tag is a declarative way to allow an action source (<commandButton>, <commandLink>, etc.) to return a value from a dialog or process. It calls the returnFromDialog method on the AdfFacesContext. This tag can be used both with ADF Faces commands and JSF standard tags. More generally, it can be used with any component at all that implements the standard ActionSource interface.

</section> <section name="Code_Example_s_">

This example shows dialog page with a table. The table has a "Select" button, which when clicked will close the dialog and return the selected Employee Number (Empno). There is also a "Cancel" button, which when clicked will close the dialog without returning a value.


  <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>

Attributes

Name Type Supports EL? Description
value Object Yes The value to return as the dialog/process result. This can be an EL expression or a constant value.