Defining an Alternate Forward for the Data Action

After you create a Struts page flow with an action forward, you can use the Struts Page Flow Diagram to add other forward transitions for the same action.

Note: When you want to provide more than one forward transition for the data action, you must override the findForward() method in your data action subclass to add the alternate forwards. By default the super class oracle.adf.controller.struts.actions.DataAction defines only the success forward result.

To add an alternate forward for a data action:

  1. Open the Struts Page Flow Diagram for your project.

  2. Define a page forward in the page flow diagram to specify a destination to a particular JSP or ADF UIX page.

  3. Layout the page flow using the data action and page forward elements.

  4. Select Forward in the Component Palette.

  5. Click the data action element in the diagram to draw the second forward transition. Click the desired data action to complete the link transition. Your page flow will look like this:

    Described in text

  6. Click on the new forward transition label and edit the name to specify the forward name in the Struts configuration file. For example, you might define one path as success and another as browse:

    Described in text

  7. Subclass the data action that specifies multiple forwards.

You can proceed to refine the page flow diagram to describe your application's page flow. You can also customize the generated web pages in the Visual Editor and begin to insert databound components from the Data Control Palette. For suggestions about page flows you can create to represent typical web application use cases, see the related topics list.


Running the Oracle ADF Application from the Page Flow Diagram

Creating a JSP or UIX Page from the Page Flow Diagram
Associating an Existing JSP or UIX Page with a Page Flow Diagram

 

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