Inserting Business Service Actions Using the Data Control Palette

You can use the Data Control Palette to create action bindings that execute the method defined by the business service through the Oracle ADF data controls. Your ADF-enabled document will display the ADF action binding as a button or as a hypertext link. In a JSP file, the button appears as an input submit field in an HTML form.

Tip: An alternative to using a button or link to execute the method is to rely on a Struts data action to execute the method. In this case, your page can display the result of the method through an ADF action binding created by the controller. Executing the method on the data action is appropriate when the method does not require user input to accept parameter values; otherwise, you can use the button (or link) in the web page to create an action binding that can submit parameter values with the HTML Form.

For a detailed example that uses Struts, JSP, ADF Business Components, and Oracle ADF action bindings with a custom method, see the end-to-end topic Using a Custom Method to Set the Bind Parameters on a View Object.

Note: The Data Control Palette may appear empty when you first open it. Complete the prerequisite steps to populate the palette with business services from your model project.

To insert a global action as a button into the web page or ADF JClient form in the Visual Editor:

  1. Create the ADF-enabled web page or ADF-enabled Swing panel and open it in the Visual Editor.

  2. Choose View | Data Control Palette to open the palette.

  3. Expand the Data Control Palette hierarchy.

    The Data Control Palette displays two types of actions:

  4. Select the desired action from the Operations folder at either the root level or in a data collection and choose Button with Form or Button (when your web page already displays an HTML form) in the dropdown list. For example, a palette selection to add a commit button with an HTML form would look similar to this:

    Data Control Palette displays button with form operation

  5. Add the button (and, optionally, the HTML form) into your web page by dragging the selection from the top portion of the Data Control Palette into the open web page in the Visual Editor. The design view of the Visual Editor displays the button inside an HTML form represented by a dashed box surrounding the button:

    Form with Commit button

    Note, the button text is derived from the generated expressions at runtime. If you prefer to supply the button text, you can edit the value in the Property Inspector.

  6. If the method that your action executes takes parameters, supply the parameter values.

Now that you have a way to execute the method, you are ready to display the method result to show the values dynamically in the web page.


For details about the hierarchy displayed by the Data Control Palette:

You can customize the properties of the action binding at design time:

 

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