Subclassing a Data Action or Data Forward Action (Data Page) for Multiple Forward Results

In the page flow diagram, when you create multiple forward transitions for any data action or data page (which uses the data action subclass DataForwardAction), the action mapping in the Struts configuration file is updated to define the resource to forward to once the action has completed. You may also need to override the findForward() method in the class file that implements the action subclass. By default the super classes oracle.adf.controller.struts.actions.DataAction and oracle.adf.controller.struts.actions.DataForwardAction define only the success forward result.

Note: In some cases you can define the resource to forward to by using events. For more information see Working with Named Events in Oracle ADF.

To subclass a data action or data page:

  1. To create the subclass, right-click the data action or data page in the page flow diagram and choose Go to code.

  2. In the dialog, the Extends field identifies the super class oracle.adf.controller.struts.actions.DataAction or oracle.adf.controller.struts.actions.DataForwardAction. Accept the default values and click OK.

    The design time adds the class file to your project and opens the file in the Java Code Editor.

  3. In the toolbar choose Tools | O verride Methods to open the Override Methods dialog.
  4. In the Override Methods dialog select findForward(DataActionContext):void.
  5. Implement the findForward() method in the Java Code Editor and save the action subclass.

Running the Oracle ADF Application from the Page Flow Diagram
Creating a Web Page from the Page Flow Diagram
Associating an Existing Web Page with a Page Flow Diagram

 

Copyright © 1997, 2004, Oracle. All rights reserved.