All Oracle ADF Struts forms use a data form bean, an instance of
oracle.adf.controller.struts.forms.BindingContainerActionForm
(a
subclass of org.apache.struts.action.ActionForm
that
implements the apache.commons.beanutils.DynaBean
interface). The data form bean dynamically makes the attributes for any
binding container available to the form and saves you the work of
creating the ActionForm beans required by your applications.
When you drag and drop a data binding from the Data Control Palette to a
JSP page, JDeveloper automatically refers to the Oracle ADF data form
bean. For each value binding in the associated binding container,
JDeveloper dynamically creates the get
and set
methods for each binding.
When JDeveloper creates a data form bean, it also makes these changes to
the struts-config.xml
file:
<form-beans>
element
<name>
element of the associated Action
Note: JDeveloper does not populate the
<form-property>
element in the struts-config.xml
file when it uses the data form bean. Your application retrieves the
necessary values from the associated binding container.
At runtime the associated action class, either a data action (instance
of oracle.struts.adf.controller.struts.actions.DataAction
)
or data page (instance of
oracle.struts.adf.controller.struts.actions.DataForwardAction
)
uses the data form bean to populate the form and submit updates, if any.
Here is an html:form
code snippet that can be used to
illustrate data form bean behavior:
<html:form action="MyDataAction.do">
<html:text property="dname">
</html:form>
At runtime the MyDataAction class needs to resolve the "dname"
property. In Oracle ADF, the html form is tied the associated action, which
is tied to the data form bean. The form goes to the data form bean to
resolve the property. The data form bean in turn asks the binding
container if it has a binding with that name. The binding container
returns the binding if it exists, and the data form populates the html
form with that binding's value.
Warning: Do not modify, rename, or remove the DataForm
class or the DataForm entries in the struts-config.xml
file. To work correctly throughout the application, this bean name must
not be changed in any way. "DataForm" is a reserved FormBean name in
Oracle ADF.
For javadoc on the classes and interfaces used for the data form bean, see:
oracle.adf.controller.struts.forms.BindingContainerActionForm
http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/DynaBean.html
http://jakarta.apache.org/struts/api/org/apache/struts/action/ActionForm.html
You can also view the source code for any class in the technology scope of your application by selecting Navigate > Go to Java Class from the main JDeveloper menu and entering the class name in the dialog's text field.
Copyright © 1997, 2004, Oracle. All rights reserved.