You can use the Data Control Palette to add methods to data actions of your databound Struts page flow. The data action executes the method defined by the business service through the Oracle ADF data controls.
Note: The Data Control Palette may appear empty when you first open it. Follow the procedure below to populate the palette with business services from your model project.
To populate the Data Control Palette with business services:
Define the business services that you want your Oracle ADF application to access. The business services appear in your model project.
Create ADF data controls in your model project to register the business services. If the Data Control Palette is already open, the business services hierarchy appears in the top portion of the palette.
To add a business service operation to a data action:
Display the page flow in the Struts Page Flow Diagram.
Choose View | Data Control Palette to open the palette.
Expand the Data Control Palette hierarchy.
The Data Control Palette displays two types of operations:
For more information about the operations available with a business service, see About Supported Data Collection Operations in Oracle ADF.
Add the method into your page flow by dragging the selection from the Data Control Palette onto the data action. The design time updates the action mapping for the data action like this:
<set-property property="methodName"
value="MyPageUIModel.ActionName"/>
<set-property
property="resultLocation" value="${requestScope.methodResult}"/>
<set-property property="numParams" value="1"/>
<set-property property="paramNames[0]" value="${param.paramName0}"/>
Note: There is a paramNames[]
property
for each method parameter. If the method has no parameters, the
value of numParams
is set to 0 and there are no
paramNames
properties set. If you are using a custom method
that requires parameters, you must add the paramNames
properties using the Struts Configuration Editor. For an example of
a scenario that uses a custom method with parameters, see
Using a Custom Method to Set the Bind Parameters in a View Object
You can continue to add additional methods to the data actions of your page flow.
You can customize the properties of the data binding objects at design time:
Customizing Oracle ADF Data Bindings in the Design Time Editors
Setting Properties of Oracle ADF Data Bindings in Expressions
You can use the Visual Editor to arrange the UI components you added.
Copyright © 1997, 2004, Oracle. All rights reserved.