Adding a Data Page to the Page Flow Diagram

If you are using the Page Flow Diagram to add an action that forwards directly to a databound web page, the data page is the best component to use. The Page Flow Diagram uses the data page icon to simplify the diagram by consolidating three objects:

Adding a data page creates action mappings for your page flow. At runtime, an Oracle ADF data forward action instance prepares the data for the web page to render.

To create a data page:

  1. If your project does not already contain the WEB-INF folder with the struts-config.xml file, add Struts support to your project.

  2. Open the Struts Page Flow Diagram and display the Component Palette.

  3. Click Data Page in the Component Palette and drag the icon to the Page Flow Diagram.

    The icon you insert into the page flow will appear with a yellow warning overlay. This indicates that you have not yet associated the data page with a model reference to define what bindings it should prepare. The icon will appear without the warning icon after you associate a model reference with the data page, either explicitly in the Property Inspector, or implicitly by dragging and dropping an operation or rowset from the data control palette onto the data page. You must also create or specify the associated web page.

  4. Double-click the label of the new datapage icon in the diagram and edit the name. Enter the name you want to assign the associated page forward or web page; JDeveloper uses the name you enter here for the name of the web page as well. For example, enter the name /myPage.

  5. Doubleclick on the data page icon to edit the associated web page.

    Before you can run an Oracle ADF data page from the page flow diagram, you must first create the associated web page to set the Oracle ADF model reference on the action class.

Before you edit the page, JDeveloper updates the struts-config.xml file with the definition for the data forward action. For example, if myPage is a JSP file:

<action path="/myPage"
   className="oracle.adf.controller.struts.actions.DataActionMapping"
   type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="myPage.jsp"/>
  
</action>

Although the class DataForwardAction.java does not appear in your client project, you can view its source code by right-clicking the data action element in the page flow diagram and pressing Ctrl and - (minus key). This data forward action class calls request.setAttribute("bindings", bindings); to publish the Oracle ADF binding context on the HTTP Request object and make it available to the databound page at runtime.


About the Page Flow in Databound Struts Applications
Choosing a Page Design Approach for the Struts Page Flow Diagram
Subclassing a Data Action or Data Forward Action (Data Page) for Multiple Forward Results

 

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