Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework 11g Release 2 (11.1.2.1.0) Part Number E16182-02 |
|
|
PDF · Mobi · ePub |
This appendix provides reference for the Oracle ADF metadata files that you create in your data model and user interface projects. You may use this information when you want to edit the contents of the metadata these files define.
This appendix includes the following sections:
Metadata files in the Oracle Fusion web application are structured XML files used by the application to:
Specify the parameters, methods, and return values available to your application's Oracle ADF data control usages
Create objects in the Oracle ADF binding context and define the runtime behavior of those objects
Define configuration information about the UI components in JSF and Oracle ADF Faces
Define application configuration information for the Java EE application server
In the case of ADF bindings, you can use the binding-specific editors to customize the runtime properties of the binding objects. You can open a binding editor when you display the Structure window for a page definition file and choose Properties from the context menu.
Additionally, you can view and edit the contents of any metadata file in JDeveloper's XML editor. The easiest way to work with these file is through the Structure window and Property Inspector. In the Structure window, you can select an element and in the Property Inspector, you can define attribute values for the element, often by choosing among dropdown menu choices. Use this reference to learn the choices you can select in the case of the Oracle ADF-specific elements.
The relationship between the Oracle ADF metadata files defines dependencies between the model data and the user interface projects. The dependencies are defined as file references within XML elements of the files.
Figure A-1 illustrates the hierarchical relationship of the XML metadata files that you might work with in a Fusion web application that uses an ADF Business Components application module as a service interface to JSF web pages.
In an ADF Business Components application, the data control implementation files are contained within the application. The application module and view object XML component descriptor files provide the references for the data control. These files, in conjunction with the bc4j.xcfg
file, provide the necessary information for the data control.
An application that uses ADF Business Components in one project and a non-ADF Business Components data control in another project may have a DataControls.dcx
file, as well as supporting <sessionbeanname>
.xml
and <beanname>
.xml
files.
These standard XML configuration files for a Fusion web application appear in your user interface project:
adfm.xml
: This file lists the DataBindings.cpx
file that is available in the current project.
See Section A.4, "adfm.xml" for more information.
DataBindings.cpx
: This file contains the page map, page definitions references, and data control references. The file is created the first time you create a data binding for a UI component (either from the Structure window or from the Data Controls Panel). The DataBindings.cpx
file defines the Oracle ADF binding context for the entire application. The binding context provides access to the bindings and data controls across the entire application. The DataBindings.cpx
file also contains references to the <pagename>
PageDef.xml
files that define the metadata for the Oracle ADF bindings in each web page.
For more information, see Section A.7, "DataBindings.cpx".
<pagename>
PageDef.xml
: This is the page definition XML file. It associates web page UI components with data, or data controls. JDeveloper creates this file each time you design a new web page using the Data Controls Panel or Structure window. These XML files contain the metadata used to create the bindings that populate the data in the web page's UI components. For every web page that refers to an ADF binding, there must be a corresponding page definition file with binding definitions.
For more information, see Section A.8, "pageNamePageDef.xml".
These standard XML configuration files required for a JSF application appear in your user interface project:
web.xml
: Part of the application's configuration is determined by the contents of its Java EE application deployment descriptor, web.xml
. The web.xml
file defines everything about your application that a server needs to know. The file plays a role in configuring the Oracle ADF data binding by setting up the ADFBindingFilter
. Additional runtime settings include servlet runtime and initialization parameters, custom tag library location, and security settings.
For more information about ADF data binding and JSF configuration options, see Section A.13, "web.xml".
An ADF Faces application typically uses its own set of configuration files in addition to web.xml
. For more information, see the "Configuration in trinidad-config.xml" section in the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.
adfc-config.xml:
The configuration file for an ADF unbounded task flow. The configuration file contains metadata about the activities and control flows contained in the unbounded task flow. The default name for this file is adfc-config.xml
, but an end user can change the name.
For more information, see Section A.9, "adfc-config.xml".
task-flow-definition.xml
: The configuration file for an ADF bounded task flow. The configuration file contains metadata about the activities and control flows contained in the bounded task flow. The default name for this file can be task-flow-defintion.xml
or whatever an end user specifies in the Create ADF Task Flow dialog. The same application can contain multiple task flow definition files.
For more information, see Section A.10, "task-flow-definition.xml".
Figure A-2 illustrates the hierarchical relationship of the XML metadata files that you might work with in a web application that uses an ADF application module as a service interface to ADF Business Components. At runtime, the objects created from these files interact in this sequence:
When the first request for an ADF databound web page occurs, the servlet registers the Oracle ADF servlet filter ADFBindingFilter
named in the web.xml
file.
The binding filter creates an empty binding context.
When a page is rendered, the binding filter asks the binding context to load a corresponding PageDef.xml
for the page.
The binding context creates the binding container by loading the <page>
file as referenced by the <pagemap>
element in the DataBindings.cpx
file.
The adfm.xml
file loads the DataBindings.cpx
contents and finds the right PageDef.xml
based on the <pagemap>
element reference to the <pageDefinitionUsage>
element.
The binding container's prepareModel
phase prepares and refreshes all relevant executables (most are marked deferred
by default).
An iterator binding gets executed by referencing the named method on the data control found through the data control factory named in the case of ADF Business Components in the bc4j.xcfg
file.
The binding container also creates the bindings defined in the <bindings>
section of the pagename
PageDef.xml
file for the mapped web page.
The web page references to ADF bindings through EL using the expression #{bindings}
are resolved by accessing the binding container of the page.
The page pulls the available data from the bindings in the binding container.
The adfm.xml
file contains the classpath-relative paths for the .cpx
, .dcx
, .jpx
, and .xcfg
files in each design time project that is included in the runtime deployed application. The adfm.xml
file operates as a dynamically maintained "Registry of Registries" that is used to quickly find all .cpx
, .dcx
, .jpx
, and .xcfg
files (which are themselves registries of metadata).
The file registry is used extensively by the ADF Library resource catalog browsing implementations, by the ADF model layer design time, and at runtime during merge and discovery.
When a developer creates a binding on a page, JDeveloper adds metadata files (for example, page definitions) in the project source tree. The adfm.xml
file then notes the location of each.
When a project is built, the adfm.xml
file is put in project-root
/adfmsrc/META-INF/adfm.xml
. The project-level archive deployment profiles locate the file at META-INF/adfm.xml
.
At runtime, the application classpath is scanned to build the list of .cpx
files that comprise the application. The application then loads each.cpx
as needed to create the binding context. For details about the ADF model layer usage, see Section 13.4.2, "What Happens When You Use the Data Controls Panel".
Four types of sub registries are recorded by the adfm.xml
file:
DataBindingRegistry
(.cpx
)
DataControlRegistry
(.dcx
)
BusinessComponentServiceRegistry
(.xcfg
)
BusinessComponentProjectRegistry
(.jpx
)
The.jpx
file contains configuration information that JDeveloper uses in the design time to allow you to create the data model project with ADF Business Components. It also contains metadata that defines how a shared application module is used at runtime. Because the shared application module can be accessed by any data model project in the same Fusion web application, JDeveloper maintains the scope of the shared application module in the ADF Business Components project configuration file.
This file is saved in the src
directory of the project. For example, if you look at the StoreFrontService.jpx
file in the ./src/model
subdirectory of the Fusion Order Demo application's StoreFrontService
project, you will see the SharedLookupService
application module's usage definition. For details about the shared application module usage, see Section 10.2.2, "What Happens When You Define a Shared Application Module".
Example A-2 displays a sample default.jpx
file.
<JboProject xmlns="http://xmlns.oracle.com/bc4j" Name="StoreFrontService" Version="11.1.1.49.73" SeparateXMLFiles="true" PackageName=""> <DesignTime> <Attr Name="_appModuleNames0" Value="oracle.fodemo.storefront.lookups.LookupServiceAM"/> <Attr Name="_domainNames0" Value="oracle.fodemo.storefront.entities.formatters.UppercaseOracleStyleDate"/> <Attr Name="_jprName" Value="../StoreFrontService.jpr"/> <Attr Name="_appModuleNames1" Value="oracle.fodemo.storefront.store.service.StoreServiceAM"/> <Attr Name="_NamedConnection" Value="FOD"/> </DesignTime> <Containee Name="links" FullName="oracle.fodemo.storefront.account.queries.links.links" ObjectType="JboPackage"> <DesignTime> <Attr Name="_VO" Value="true"/> <Attr Name="_VL" Value="true"/> </DesignTime> </Containee> <Containee Name="queries" FullName="oracle.fodemo.storefront.account.queries.queries" ObjectType="JboPackage"> <DesignTime> <Attr Name="_VO" Value="true"/> </DesignTime> </Containee> <Containee Name="associations" FullName="oracle.fodemo.storefront.entities.associations.associations" ObjectType="JboPackage"> <DesignTime> <Attr Name="_AS" Value="true"/> </DesignTime> </Containee> <Containee Name="entities" FullName="oracle.fodemo.storefront.entities.entities" ObjectType="JboPackage"> <DesignTime> <Attr Name="_EO" Value="true"/> </DesignTime> </Containee> <Containee Name="formatters" FullName="oracle.fodemo.storefront.entities.formatters.formatters" ObjectType="JboPackage"> <DesignTime> <Attr Name="_DO" Value="true"/> </DesignTime> </Containee> <Containee Name="lookups" FullName="oracle.fodemo.storefront.lookups.lookups" ObjectType="JboPackage"> <DesignTime> <Attr Name="_VO" Value="true"/> <Attr Name="_AM" Value="true"/> </DesignTime> </Containee> <Containee Name="links" FullName="oracle.fodemo.storefront.store.queries.links.links" ObjectType="JboPackage"> <DesignTime> <Attr Name="_VL" Value="true"/> </DesignTime> </Containee> <Containee Name="queries" FullName="oracle.fodemo.storefront.store.queries.queries" ObjectType="JboPackage"> <DesignTime> <Attr Name="_VO" Value="true"/> </DesignTime> </Containee> <Containee Name="service" FullName="oracle.fodemo.storefront.store.service.service" ObjectType="JboPackage"> <DesignTime> <Attr Name="_AM" Value="true"/> </DesignTime> </Containee> <AppModuleUsage Name="SharedLookupService" FullName="oracle.fodemo.storefront.lookups.LookupServiceAM" ConfigurationName="oracle.fodemo.storefront.lookups.null" SharedScope="1"/> </JboProject>
The bc4j.xcfg
file contains metadata information about application module names, the database connection used by the application module, and the runtime parameters the user has configured for the application module.
The bc4j.xcfg
file is located in the ./common
subdirectory relative to the application module's XML component definition. All of the configurations for all of the application modules in a single Java package are saved in that same file. For example, if you look at the bc4j.xcfg
file in the ./classes/oracle/fodemo/storefront/store/service/common
directory of the Fusion Order Demo application's StoreFront
project, you will see the three named configurations for its StoreServiceAM
application module. For details about editing the configurations, see Section 9.3.4, "How to Change Your Application Module's Runtime Configuration" and Section 44.2, "Setting Pool Configuration Parameters".
Example A-2 displays a sample bc4j.xcfg
file from the Fusion Order Demo application.
Example A-2 Sample bc4j.xcfg File
<BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration"> <AppModuleConfigBag ApplicationName="oracle.fodemo.storefront.store.service.StoreServiceAM"> <AppModuleConfig DeployPlatform="LOCAL" JDBCName="FOD" jbo.project="StoreFrontService" name="StoreServiceAMLocal" ApplicationName="oracle.fodemo.storefront.store.service.StoreServiceAM"> <Database jbo.locking.mode="optimistic"/> <Security AppModuleJndiName="oracle.fodemo.storefront.store.service.StoreServiceAM"/> </AppModuleConfig> <AppModuleConfig DeployPlatform="LOCAL" JDBCName="FOD" jbo.project="StoreFrontService" name="StoreServiceAMLocalWeb" ApplicationName="oracle.fodemo.storefront.store.service.StoreServiceAM"> <AM-Pooling jbo.ampool.initpoolsize="1"/> <Database jbo.locking.mode="optimistic"/> <Security AppModuleJndiName="oracle.fodemo.storefront.store.service.StoreServiceAM"/> <Custom fod.application.issoaenabled="true"/> </AppModuleConfig> <AppModuleConfig name="StoreFrontService" ApplicationName="oracle.fodemo.storefront.store.service.StoreServiceAM" jbo.project="StoreFrontService" DeployPlatform="SI"> <AM-Pooling jbo.ampool.resetnontransactionalstate="true"/> <Database jbo.SQLBuilder="ORACLE" jbo.locking.mode="optimistic" jbo.TypeMapEntries="Java"/> <Security AppModuleJndiName="oracle.fodemo.storefront.store.service.StoreServiceAM"/> <Custom JDBCDataSource="java:comp/env/jdbc/FODDS"/> </AppModuleConfig> </AppModuleConfigBag> </BC4JConfig>
The DataBindings.cpx
file is created in the user interface project the first time you drop a data control usage onto a web page in the visual editor. The DataBindings.cpx
file defines the Oracle ADF binding context for the entire application and provides the metadata from which the Oracle ADF binding objects are created at runtime. It is used extensively by the ADF Library Resource Palette browsing implementations, and also by the .cpx
and .dcx
design time and runtime merge and discovery. When you insert a databound UI component into your document, the page will contain binding expressions that access the Oracle ADF binding objects at runtime.
If you are familiar with building Fusion web applications in earlier releases of JDeveloper, you'll notice that the.cpx
file no longer contains all the information copied from the DataControls.dcx
file, but only a reference to it. If you need to make changes to the.cpx
file, you must edit the DataControls.dcx
file.
The DataBindings.cpx
file appears in the /src
directory of the user interface project. When you double-click the file node, the binding context description appears in the XML source editor. (To edit the binding context parameters, use the Property Inspector and select the desired parameter in the Structure window.)
The top level element of the DataBindings.cpx
file is <DataControlConfigs>
:
<?xml version = '1.0' encoding = 'UTF-8'?> <BC4JConfig version="11.0" xmlns="http://xmlns.oracle.com/bc4j/configuration">
where the XML namespace attribute (xmlns
) specifies the URI to which the data controls bind at runtime. Only the package name is editable; all other attributes should have the values shown.
Figure A-3 displays the child element hierarchy of the <DataControlConfigs>
element. Note that each business service for which you have created a data control will have its own <dataControlUsages>
definition.
The child elements have the following usages:
<definitionFactories>
registers a factory class to create the ADF binding objects associated with a particular namespace at runtime. The factory class is specific to the namespace associated with the type of ADF binding (for instance, a task flow binding).
<pageMap>
maps all user interface URLs and the corresponding page definition usage name. This map is used at runtime to map a URL to its page definition.
<pageDefinitionUsages>
maps a page definition usage (BindingContainer
instance) name to the corresponding page definition. The id
attribute represents the usage ID. The path attribute represents the full path to the page definition.
<dataControlUsages>
declares a list of data control usages (shortnames) and corresponding path to the data control definition entries in the .dcx
or .xcfg
file.
Table A-1 describes the attributes of the DataBindings.cpx
elements.
Table A-1 Attributes of the DataBindings.cpx File Elements
Element Syntax | Attributes | Attribute Description |
---|---|---|
|
|
A URI. Identifies the location of the executable elements in the page definition usage. |
|
The fully qualified class name. Identifies the location of the factory class that creates the page definition usage objects. |
|
|
|
The full directory path. Identifies the location of the user interface page. |
|
A unique qualifier. Names the page definition ID that appears in the ADF page definition file. The ADF binding servlet looks at the incoming URL requests and checks that the |
|
|
|
A unique qualifier. References the page definition ID that appears in the ADF page definition file. |
|
The fully qualified package name. Identifies the location of the user interface page's ADF page definition file. |
|
|
|
A unique qualifier. Identifies the data control usage as is defined in the |
|
The fully qualified package name. Identifies the location of the data control. |
Example A-3 shows the syntax for the DataBindings.cpx
file in the Fusion Order Demo application.
The ADF executable definition factory (factory
element) is named by a className
attribute and is associated with a namespace
. At runtime, the factory class creates the executable definition objects that leads to the creation of the binding objects for the ADF binding container associated with a particular page definition. The factory locates the page definition through two DataBindings.cpx
file elements: the pageMap
element that maps the page URL to the page definition ID (usageId
attribute) assigned at design time and the pageDefinitionUsages
element that maps the ID to the location of the page definition from the project or project classpath.
Additionally, the ADF Business Components data control (BC4JDataControl
element) is named by the id
attribute. The combination of the Package
attribute and the Configuration
attribute is used to locate the bc4j.xcfg
file in the ./common
subdirectory of the indicated package. The configuration contains the information of the application module name and all the runtime parameters the user has configured.
Example A-3 Sample DataBindings.cpx File
<Application xmlns="http://xmlns.oracle.com/adfm/application" version="11.1.1.44.61" id="DataBindings" SeparateXMLFiles="false" Package="oracle.fodemo.storefront" ClientType="Generic" ErrorHandlerClass="oracle.fodemo.frmwkext.FODCustomErrorHandler"> <definitionFactories> <factory nameSpace="http://xmlns.oracle.com/adf/controller/binding" className="oracle.adf.controller.internal.binding. TaskFlowBindingDefFactoryImpl"/> <factory nameSpace="http://xmlns.oracle.com/adfm/dvt" className="oracle.adfinternal.view.faces.dvt.model.binding. FacesBindingFactory"/> </definitionFactories> <pageMap> <page path="/home.jspx" usageId="homePageDef"/> ... </pageMap> <pageDefinitionUsages> <page id="homePageDef" path="oracle.fodemo.storefront.pageDefs.homePageDef"/> ... </pageDefinitionUsages> <dataControlUsages> <BC4JDataControl id="StoreServiceAMDataControl" Package="oracle.fodemo.storefront.store.service" FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl" SupportsTransactions="true" SupportsFindMode="true" SupportsRangesize="true" SupportsResetState="true" SupportsSortCollection="true" Configuration="StoreServiceAMLocalWeb" syncMode="Immediate" xmlns="http://xmlns.oracle.com/adfm/datacontrol"/> ... </dataControlUsages> </Application>
The pageName
PageDef.xml
files are created each time you insert a databound component into a web page using the Data Controls Palette or Structure window. These XML files define the Oracle ADF binding container for each web page in the application. The binding container provides access to the bindings within the page. You will have one XML file for each databound web page.
Caution:
TheDataBindings.cpx
file maps JSF pages to their corresponding page definition files. If you change the name of a page definition file or a JSF page, JDeveloper does not automatically refactor the DataBindings.cpx
file. You must manually update the page mapping in the DataBindings.cpx
file.The PageDef.xml
file appears in the /src/view
directory of the user interface project. The Application Navigator displays the file in the view package of the Application Sources node. When you double-click the file node, the page description appears in the XML source editor. To edit the page description parameters, use the Property Inspector and select the desired parameter in the Structure window.
For more information, see Chapter 13, "Working with Page Definition Files".
There are important differences in how the page definitions are generated for methods that return a single value and a collection.
The top-level element of the PageDef.xml
file is <pageDefinition>
:
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="10.1.3.35.83" id="<pagename>PageDef" Package="oracle.fod.view.pageDefs">
where the XML namespace attribute (xmlns
) specifies the URI to which the ADF binding container binds at runtime. Only the package name is editable; all other attributes should have the values shown.
Example A-4 displays the child element hierarchy of the <pageDefinition>
element. Note that each business service for which you have created a data control will have its own <AdapterDataControl>
definition.
Example A-4 PageDef.xml Element Hierarchy
<?xml version="1.0" encoding="UTF-8" ?> <pageDefinition> <parameters> ... </parameters> <executables> ... </executables> <bindings> ... </bindings> </pageDefinition>
The child elements have the following usages:
<parameters>
defines page-level parameters that are EL accessible. These parameters store information local to the web page request and may be accessed in the binding expressions.
<executables>
defines the list of items (methods, view objects, and accessors) to execute during the prepareModel
phase of the ADF page lifecycle. Methods to be executed are defined by <methodIterator>
. The lifecycle performs the execute in the sequence listed in the <executables>
section. Whether or not the method or operation is executed depends on its refresh or refreshCondition
attribute value. Built-in operations on the data control are defined by:
- <page>
- definition for a nested page definition (binding container)
- <iterator>
- definition to a named collection in DataControls
- <accessorIterator>
- definition to get an accessor in a data control hierarchy
- <methodIterator>
- definition to get to an iterator returned by an invoked method defined by a methodAction
in the same file
- <variableIterator>
- internal iterator that contains variables declared for the binding container
- <invokeAction>
- definition of which method to invoke as an executable
<bindings>
refers to an entry in <executables>
to get to the collection from which bindings extract/submit attribute level data.
Table A-2 describes the attributes of the top-level <pageDefinition>
element.
Table A-2 Attributes of the PageDef.xml File <pageDefinition> Element
Element Syntax | Attributes | Attribute Description |
---|---|---|
|
|
Fully qualified class name to create when controller requests a |
|
Enables currency validation for this bindingContainer when a postback occurs. This is to confirm that the web tier state matches the state that particular page was rendered with. |
|
|
FindMode is for legacy (10.1.2) use only and indicates whether this bindingContainer should start out in findMode when initially prepared. |
|
|
Fully qualified package name. Identifies the class which contains translation strings for any bindings. |
|
|
Determines if data validation occurs. The supported values are:
Setting a value for this attribute can be useful if you want to skip data validation on, for example, a train component. For more information see the "How to Create the Train Model" section of the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework |
|
|
An EL expression that should resolve at runtime to whether this binding and the associated component should be rendered or not. |
Table A-3 describes the attributes of the child element of <parameters>
.
Table A-3 Attributes of the PageDef.xml File <parameters> Element
Element Syntax | Attributes | Attribute Description |
---|---|---|
|
|
Specifies when the parameter should be evaluated: |
|
Unique identifier. May be referenced by ADF bindings. |
|
|
Indicates the usage of the variable within the binding container:
|
|
|
Indicates whether the parameter value may be modified or not. Set to |
|
|
A default value, which can be an EL expression. |
Table A-4 describes the attributes of the PageDef.xml
<executables>
elements.
Table A-4 Attributes of the PageDef.xml File <executables> Element
Element Syntax | Attributes | Attribute Description |
---|---|---|
|
|
Specifies any other accessor defined by this binding. |
|
Specifies the view or action to which the iterator is bound. |
|
|
Identifies the Java type of beans in the associated iterator or collection. |
|
|
If |
|
|
Specifies the rate of events when a component is wired to data via this iterator and is in polling event mode. |
|
|
Interprets and returns the collection referred to by this iterator binding. |
|
|
Unique identifier. May be referenced by any ADF value binding. |
|
|
Reference to the |
|
|
Used for ADF Business Components only. A boolean value determines whether the collection is an object type or not. |
|
|
Specifies the number of data objects in a range to fetch from the bound collection. The range defines a window you can use to access a subset of the data objects in the collection. By default, the range size is set to a range that fetches just ten data objects. Use |
|
|
Determines when and whether the executable should be invoked. Set one of the following properties as required:
|
|
|
An EL expression that when resolved, determines when and whether the executable should be invoked. For example, |
|
|
Specifies the condition after which the page should be refreshed. |
|
|
Specify a value to determine if a result set returns the number of rows you specify as a value. If you set Set |
|
|
Specifies whether the iterator is sortable or not. |
|
|
|
Determines the action to invoke. This may be on any
|
|
Unique identifier. May be referenced by any ADF action binding. |
|
|
See |
|
|
See |
|
|
|
Identifies the Java type of beans in the associated iterator or collection. |
|
This is for backward compatibility to indicate which class implements the runtime for this binding definition. Not used in current JDeveloper release. |
|
|
See |
|
|
See |
|
|
Specifies the rate of events when a component is wired to data via this iterator and is in polling event mode. |
|
|
Name of the |
|
|
Used internally by ADF. |
|
|
Unique identifier. May be referenced by any ADF value binding. |
|
|
Not used by EJB session facade data control (used by ADF Business Components only). |
|
|
See |
|
|
See |
|
|
Specifies the condition after which the page should be refreshed. |
|
|
See |
|
|
See |
|
< |
|
Unique identifier. In the case of |
|
Specifies the rate of events when a component is wired to data via this iterator and is in polling event mode. |
|
|
Used by |
|
|
See |
|
|
Specifies the condition after which the page should be refreshed. |
|
|
See |
Table A-5 describes the attributes of the PageDef.xml <bindings>
element.
Table A-5 Attributes of the PageDef.xml File <bindings> Element
Element Syntax | Attributes | Attribute Description |
---|---|---|
|
|
Fully qualified package name. Identifies the class for which the data control is created. In the case of the EJB session facade, this is the session bean. |
|
This is for backward compatibility to indicate which class implements the runtime for this binding definition. This is used by earlier versions of JDeveloper. |
|
|
Name of the |
|
|
Used by default when you drop an operation from the Data Controls Panel in the automatically configured |
|
|
Specifies the instance name for the action. |
|
|
Specifies the |
|
|
Use if you want to use the result of a method action binding (once converted to a |
|
|
|
Set to |
|
This is for backward compatibility to indicate which class implements the runtime for this binding definition. This is used by earlier versions of JDeveloper. |
|
|
Specifies the event strategy for the component when run with ADS (Active Data Services). Can be specified as push poll ppr none |
|
|
Used internally by ADF. |
|
|
This is the class name for a o |
|
|
Used internally by ADF. |
|
|
Unique identifier. May be referenced by any ADF action binding. |
|
|
Refers to the |
|
|
Refers to the entry in the message bundle for this |
|
|
|
Set to |
|
This is for backward compatibility to indicate which class implements the runtime for this binding definition. This is used by earlier versions of JDeveloper. |
|
|
Identifies whether the value at the zero index in the static value list in this boolean list binding represents |
|
|
Used internally by ADF. |
|
|
This is the class name for a |
|
|
Used internally by ADF. |
|
|
Unique identifier. May be referenced by any ADF action binding. |
|
|
Refers to the |
|
|
Refers to the |
|
|
Determines whether this list binding is for navigation, contains a static list of values or is an LOV type list. |
|
|
Describes whether this list binding has a null value and, if so, whether it should be displayed at the beginning or the end of the list. |
|
|
Refers to the entry in the message bundle for this |
|
|
Maps the data binding XML for an ADF Faces gantt component. |
|
|
Maps the data binding XML for an ADF Faces gauge component. |
|
< |
|
Set to |
|
This is for backward compatibility to indicate which class implements the runtime for this binding definition. This is used by earlier versions of JDeveloper. |
|
|
Identifies whether the value at the zero index in the static value list in this boolean list binding represents |
|
|
The name of the accessor to invoke to get the next level of nodes for a given hierarchical node type in a tree. |
|
|
Used internally by ADF. |
|
|
This is the class name for a |
|
|
Used internally by ADF. |
|
|
An XML file that specifies the type of graph to use, for example, pie chart or bar graph. This XML file can be used to customize the visual properties of the graph. It contains graph attributes such as title, subtitle, footnote, graph type, legend area, and plot area. The default filename is |
|
|
For master-detail forms, specifies the attribute that will be used to group data. |
|
|
Unique identifier. May be referenced by any ADF action binding. |
|
|
Refers to the |
|
|
Refers to the entry in the message bundle for this |
|
|
Defines the attribute, based on which data will be clubbed. |
|
|
Determines whether graph is for |
|
|
Wraps the data binding XML for an ADF Faces graph component. |
|
|
|
Set to |
|
This is for backward compatibility to indicate which class implements the runtime for this binding definition. This is used by earlier versions of JDeveloper. |
|
|
Used internally by ADF. |
|
|
This is the class name for a |
|
|
Used internally by ADF. |
|
|
Unique identifier. May be referenced by any ADF action binding. |
|
|
Refers to the |
|
|
Refers to the |
|
|
Determines whether this list binding is for navigation, contains a static list of values, or is an LOV type list. |
|
|
The value of this attribute determines if the list binding passes the actual value ( |
|
|
Specifies the number of items to display in a choice list when you want to provide a shortcut for the end-user to display their most recent selections. For example, a form might display a choice list of supplier ID values to drive a purchase order form. In this case, you can allow users to select from a list of their most recently view suppliers, where the number of supplier choices is determined by the count you enter. The default for the choice list is to display all values for the attribute and is specified by the count 0 (zero)." |
|
|
Specifies the |
|
|
Describes whether this list binding has a null value and, if so, whether it should be displayed at the beginning of the list or the end. |
|
|
Refers to the entry in the message bundle for this |
|
|
Defines a static list of values that will be rendered in the bound list component. |
|
|
Wraps the data binding XML for an ADF Data Visualization geographic map component. |
|
|
|
Fully qualified package name. Identifies the class for which the data control is created. In the case of the EJB session facade, this is the session bean. |
|
This is for backward compatibility to indicate which class implements the runtime for this binding definition. This is used by earlier versions of JDeveloper. |
|
|
This is the class to which the method being invoked belongs. |
|
|
Name of the |
|
|
Used internally by ADF. |
|
|
Unique identifier. May be referenced by any ADF action binding. |
|
|
A dot-separated EL path to a Java object instance on which the associated method is to be invoked. |
|
|
Set to |
|
|
Set to |
|
|
Indicates the name of the operation on the given instance or class that needs to be invoked for this |
|
|
Whether this action requires that the model be updated before the action is to be invoked. |
|
|
The EL path of the result returned by the associated method. |
|
|
Wraps the data binding XML for an ADF Faces pivot table component. |
|
|
|
Set to |
|
This is for backward compatibility to indicate which class implements the runtime for this binding definition.This is used by earlier versions of JDeveloper. |
|
|
Accesses the |
|
|
Used internally for testing purposes. |
|
|
This is the class name for a |
|
|
Used internally by ADF. |
|
|
Indicates the discriminator value for a hierarchical type binding (type definition for a tree node). This value is used to determine whether a given row in a collection being rendered in a polymorphic tree binding should be rendered using the containing hierarchical type binding. |
|
|
Unique identifier. May be referenced by any ADF action binding. |
|
|
Refers to the |
|
|
The data model used by ADF Tree components. |
The adfc-config.xml
file is the source file for the ADF unbounded task flow that JDeveloper creates by default when you create an application using the Fusion Web Application (ADF) template. By default, JDeveloper stores the adfc-config.xml
file in the following directory:
application_root
\ViewController\Web Content\WEB-INF
If you create additional unbounded task flows, JDeveloper proposes the following file name for the source files of the additional unbounded task flows:
adfc-config
N
.xml
where N is a number that increments each time you create a new unbounded task flow. Alternatively, you choose the file name you want for an unbounded task flow's source file.
Each source file for an unbounded task flow contains the metadata for activities, control flow rules, and managed beans that you added to an unbounded task flow so that end users can interact with the Fusion web application to complete a task.
The XML schema definition file (XSD) that defines valid metadata entries for the adfc-config.xml
file is adfc-config_1_0.xsd
. The adfc-config_1_0.xsd
file is stored in the adf-controller-schema.jar
file in the following directory of your JDeveloper installation:
jdev_install
\oracle_common\modules\oracle.adf.model_11.1.1
Use JDeveloper's XSD Visual Editor to view the adfc-config_1_0.xsd
file. Using this editor, you can identify the valid metadata elements and attributes for the adfc-config.xml
file.
Example A-5 shows the source file for an unbounded task flow where view activities, control flow rules, and so on have yet to be added.
Example A-5 Sample adfc-config.xml file with no entries
<?xml version="1.0" encoding="windows-1252" ?> <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2"> </adfc-config>
Figure A-4 shows the Diagram view of the Fusion Order Demo application's adfc-config.xml
file. Example A-6 shows the corresponding source view of the unbounded task flow that appears in Figure A-4. For brevity, many metadata entries have been removed from Example A-6. However, instances of metadata that identify view activities (<view id>
), a task flow call activity (<task-flow-call>
), control flow rules (<control-flow-rule>
), and managed beans (<managed-bean>
) remain.
For more information about unbounded task flows, Chapter 18, "Getting Started with ADF Task Flows."
Example A-6 Source View of Fusion Order Demo Application's adfc-config.xml file
<?xml version="1.0" encoding="windows-1252" ?> <adfc-config xmlns="http://xmlns.oracle.com/adf/controller"> <metadata-resource>/WEB-INF/adfc-config.xml</metadata-resource> <view id="home"> <page>/home.jspx</page> </view> <task-flow-call id="checkout-task-flow"> <task-flow-reference> <document>/WEB-INF/checkout-task-flow.xml</document> <id>checkout-task-flow</id> </task-flow-reference> </task-flow-call> <view id="updateUserInfo"> <page>/account/updateUserInfo.jspx</page> </view> ... <task-flow-call id="myorders-task-flow"> <task-flow-reference> <document>/WEB-INF/myorders-task-flow.xml</document> <id>myorders-task-flow</id> </task-flow-reference> </task-flow-call> <control-flow-rule> <from-activity-id>*</from-activity-id> <control-flow-case> <from-outcome>globalHome</from-outcome> <to-activity-id>home</to-activity-id> </control-flow-case> <!-- removed control flow cases for brevity --> </control-flow-rule> <managed-bean> <managed-bean-name>homePageBean</managed-bean-name> <managed-bean-class>oracle.fodemo.storefront.store.view.managed.HomeBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <!-- removed managed beans for brevity --> </adfc-config>
The default file name that JDeveloper proposes for the source file of the first ADF bounded task flow that you create is task-flow-definition.xml
. This file stores the metadata for a bounded task flow. It contains entries for each view activity, method call activity, task flow call, and so on that you add to the bounded task flow.
JDeveloper proposes the following file name for subsequent bounded task flows that you create:
task-flow-definition
N
.xml
where N is a number that increments each time you create a new bounded task flow. Alternatively, you choose the file name you want for a bounded task flow's source file. By default, JDeveloper stores the task-flow-definition.xml
file in the following directory:
application_root
\ViewController\Web Content\WEB-INF
The XML schema definition files (XSD) that define the valid metadata entries for the source file of a bounded task flow are stored in the adf-controller-schema.jar
file in the following directory of your JDeveloper installation:
jdev_install
\oracle_common\modules\oracle.adf.model_11.1.1
Use JDeveloper's XSD Visual Editor to view these XSD files and identify the valid metadata elements and attributes for the source file of a bounded task flow.
Example A-7 shows the content of a source file when you create a new bounded task flow using the Create Task Flow dialog. The <task-flow-definition>
element identifies this file as a bounded task flow. JDeveloper generates the <task-flow-definition>
element when you select the Create as Bounded Task Flow check box in the Create Task Flow dialog. The value of the <task-flow-definition>
element's id
attribute (task-flow-definition
) corresponds to the value that you enter in the Task Flow ID field of the Create Task Flow dialog. The <use-page-fragments/>
element indicates that all view activities in this bounded task flow must be associated with page fragments. JDeveloper generates this entry when you select the Create with Page Fragments check box in the Create Task Flow dialog.
Example A-7 Sample task-flow-definition.xml with no entries
<?xml version="1.0" encoding="windows-1252" ?> <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2"> <task-flow-definition id="task-flow-definition"> <use-page-fragments/> </task-flow-definition> </adfc-config>
Example A-8 shows an abbreviated version of the Fusion Order Demo application's customer-registration-task-flow.xml
file. Many metadata entries have been removed for brevity. However, you can view entries for the activities shown in the Structure window in Figure A-5.
For more information about bounded task flows, see Chapter 18, "Getting Started with ADF Task Flows".
Example A-8 Abbreviated Source View of the customer-registration-task-flow.xml File
<?xml version="1.0" encoding="windows-1252" ?> <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.0"> <task-flow-definition id="customer-registration-task-flow"> <default-activity>userRegistrationCreate</default-activity> <transaction> <requires-transaction/> </transaction> <input-parameter-definition> <name>param_userType</name> <value>#{pageFlowScope.userType}</value> <class>java.lang.String</class> <required/> </input-parameter-definition> <managed-bean> <managed-bean-name>custRegBasicInformationBean</managed-bean-name> <managed-bean-class>....CustRegBasicInformationBean</managed-bean-class> <managed-bean-scope>view</managed-bean-scope> <managed-property> <property-name>allItemsIteratorName</property-name> <value>AvailableCategoriesShuttleListIterator</value> </managed-property> </managed-bean> <exception-handler>errorPage</exception-handler> <view id="reviewCustomerInfo"> <display-name>Review</display-name> <page>/account/reviewCustomerInfo.jsff</page> <train-stop> <display-name>Review</display-name> </train-stop> </view> <task-flow-return id="rollbackReturn"> <outcome> <name>cancelCreateCust</name> <rollback/> </outcome> </task-flow-return> <method-call id="createAddress"> <method>#{bindings.CreateInsert.execute}</method> <outcome> <fixed-outcome>editAddress</fixed-outcome> </outcome> </method-call> <view id="paymentOptionDetails"> <page>/account/paymentOptionDetails.jsff</page> </view> <parent-action id="Exit"> <parent-outcome>globalHome</parent-outcome> </parent-action> <train/> <control-flow-rule> <from-activity-id>*</from-activity-id> <control-flow-case> <from-outcome>exitRegistration</from-outcome> <to-activity-id>Exit</to-activity-id> </control-flow-case> <control-flow-case> <from-outcome>cancelRegistration</from-outcome> <to-activity-id>rollbackReturn</to-activity-id> </control-flow-case> </control-flow-rule> <control-flow-rule> <from-activity-id>userRegistrationCreate</from-activity-id> <control-flow-case> <from-outcome>editBasicInfo</from-outcome> <to-activity-id>basicInformation</to-activity-id> </control-flow-case> </control-flow-rule> <use-page-fragments/> </task-flow-definition> </adfc-config>
JDeveloper generates the adf-config.xml
file when you create an application using the Fusion Web Application (ADF) template. It stores the file in the following directory:
application_root
\.adf\META-INF
The adf-config.xml
file specifies application-level settings that are usually determined at deployment and are often changed at runtime. You can use a deployment profile to specify settings that are used at application deploy time. You can change some of the settings at runtime using Oracle Enterprise Manager.
Examples of tasks that you can accomplish by changing settings in the adf-config.xml
file include the following:
Enable or disable the validation of ADF Controller metadata
Replicate memory scope if you deploy your Fusion web application in a clustered environment
Configure properties to manage the caching of resource bundles where your application uses EL expressions to retrieve strings at runtime from resource bundles
The properties that you can configure are:
initial-size
Specifies the initial number of resource bundles that your application can cache. The default value is 100
.
max-size
Specifies the maximum number of resource bundles that your application can cache. The default value is 100
.
load-factor
The default value is 0.75
.
expire-time
The default value is 43200
seconds (12 hours).
You specify these properties as attribute values of the <resource-bundle-cache>
element in the adf-config.xml
file. Example A-9 demonstrates how you might configure these values for your application in the adf-config.xml
file.
As an alternative to configuring the caching of resource bundles in the adf-config.xml
file, you can specify the resource bundle caching properties as parameters for the Java Virtual Machine (JVM). If you specify the properties as parameters for the JVM, the changes apply to all applications managed by the JVM. For this reason, we recommend that you configure the resource bundle caching properties in the adf-config.xml
file for you application. Use the following property names if you decide to specify the resource bundle caching properties as parameters for the JVM:
resource-bundle-cache-initial-size
resource-bundle-cache-max-size
resource-bundle-cache-load-factor
resource-bundle-cache-expire-time
At runtime, the Fusion web application loads the adf-config.xml
file from the META-INF
directory. If the Fusion web application finds more than one adf-config.xml
file, it stops loading the file and logs a warning.
The following tasks modify or require you to modify the adf-config.xml
file:
Creating task flows
For more information, see Chapter 18, "Getting Started with ADF Task Flows".
Enabling implicit save points
For more information, see Section 22.6.7, "How to Enable Implicit Save Points".
Disable automatic partial page rendering as the default behavior for an application. This requires you to change the value for the changeEventPolicy
attribute from the default value of ppr
:
<defaults changeEventPolicy="ppr"/>
For more information, see Section 25.2.1, "What You May Need to Know About Partial Page Rendering and Iterator Bindings."
Persisting saved searches in MDS
For more information, see Section 31.2.4, "How to Persist Saved Searches into MDS".
Configuring ADF Business Components global settings
For more information, see Section 42.1.1, "Limiting the View Object Max Fetch Size to Fetch the First n Rows" and Section 3.3.1, "Choosing a Connection, SQL Platform, and Data Type Map."
Enabling Oracle ADF Security
For more information, see Section 35.3.2, "What Happens When You Enable ADF Security".
Enabling seeded customizations
For more information, Section 39.2.4, "How to Enable Seeded Customizations for View Projects" and Section 39.2.5, "How to Enable Seeded Customizations in Existing Pages".
Configuring change persistence
For more information, see Section 40.2.1, "How to Enable User Customizations".
Enabling user customizations
For more information, see Section 40.2.2, "What Happens When You Enable User Customizations".
Example A-9 shows example entries for an application's adf-config.xml
file.
Example A-9 Sample adf-config.xml File
<?xml version="1.0" encoding="windows-1252" ?> <adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:sec="http://xmlns.oracle.com/adf/security/config"> <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config"> <JaasSecurityContext initialContextFactoryClass="oracle.adf.share.security.JAASInitialContextFactory" jaasProviderClass="oracle.adf.share.security.providers.jps.JpsSecurityContext" authorizationEnforce="true" authenticationRequire="true"/> <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore" credentialStoreLocation="../../src/META-INF/jps-config.xml"/> </sec:adf-security-child> <adf-controller-config xmlns="http://xmlns.oracle.com/adf/controller/config"> <savepoint-datasource>java:comp/env/jdbc/FODDS</savepoint-datasource> <enable-implicit-savepoints>true</enable-implicit-savepoints> </adf-controller-config> <adf-faces-config xmlns="http://xmlns.oracle.com/adf/faces/config"> <persistent-change-manager> <persistent-change-manager-class>oracle.adf.view.rich.change.MDSDocumentChangeManager</persistent-change-manager-class> </persistent-change-manager> <taglib-config> <taglib uri="http://xmlns.oracle.com/adf/faces/rich"> <tag name="calendar"> <attribute name="activeDay"> <persist-changes>true</persist-changes> </attribute> </tag> <!-- Additional tags omitted to make this example concise --> <tag name="table"> <attribute name="filterVisible"> <persist-changes>true</persist-changes> </attribute> </tag> </taglib> </taglib-config> </adf-faces-config> <adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config"> <mds-config xmlns="http://xmlns.oracle.com/mds/config" version="11.1.1.000"> <cust-config> <match path="/"> <customization-class name="oracle.adf.share.config.UserCC"/> </match> </cust-config> </mds-config> </adf-mds-config> <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config"> <defaults rowLimit="100"/> <startup> <amconfig-overrides> <config:Database jbo.SQLBuilder="Oracle" jbo.locking.mode="optimistic"/> </amconfig-overrides> </startup> </adf-adfm-config> <!-- Properties to manage the caching of a resource bundle in your application --> <adf-resourcebundle-config xmlns="http://xmlns.oracle.com/adf/resourcebundle/config"> <applicationBundleName> path-to-resource-bundle/bundle-name </applicationBundleName> <resource-bundle-cache initial-size="20" max-size="100" expire-time="30000" load-factor=".75"/> <bundleList> <bundleId override="true"> package.BundleID </bundleId> </bundleList> </adf-resourcebundle-config> </adf-config>
The adf-settings.xml
file holds project-level and library-level settings such as ADF Faces help providers and ADF Controller phase listeners.
The configuration settings for adf-settings.xml
are fixed and cannot be changed during or after application deployment. There can be multiple adf-settings.xml
files in an application. The users of adf-settings.xml
files are responsible for merging the contents of their configuration.
JDeveloper creates an adf-settings.xml
file when you:
Create an application using the Fusion Web Application (ADF) template
Add ADF Page Flow (ADF Controller) to the technology scope of an existing project
By default, JDeveloper stores the adf-settings.xml
file in the following directory:
application_root\ViewController\src\META-INF
The following tasks modify or require you to modify the adf-settings.xml
file:
Registering a phase listener
For more information, see Section 25.4.2, "How to Register a Listener Globally".
Creating help for ADF Faces components
For more information, see the "Displaying Help for Components" section in the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.
Example A-10 shows a sample adf-setting.xml
file with settings configured for a phase listener and a help provider.
Example A-10 Sample adf-settings.xml File
<?xml version="1.0" encoding="windows-1252" ?> <adf-settings xmlns="http://xmlns.oracle.com/adf/config"> <adfc-controller-config xmlns="http://xmlns.oracle.com/adf/controller/config"> <lifecycle> <phase-listener> <listener-id>FODPhaseListener</listener-id> <class>oracle.fodemo.storefront.listeners.FODPhaseListener</class> </phase-listener> </lifecycle> </adfc-controller-config> <adf-faces-config> <help-provider prefix="MYAPP"> <help-provider-class>oracle.fodemo.storefront.MyHelpProvider</help-provider-class> <property> <property-name>myCustomProperty</property-name> <value>someValue</value> </property> </help-provider> </adf-faces-config> </adf-settings>
Oracle ADF has specific configuration settings for the standard web.xml
deployment descriptor file.
When you create a project in JDeveloper that uses JSF technology, a starter web.xml
file with default settings is created for you in the /WEB-INF
folder. To edit the file, double-click web.xml in the Application Navigator to open it in the XML editor.
The following must be configured in web.xml
for all applications that use JSF and ADF Faces:
ADF Library resource servlet and mapping: Serves up web application resources (images, style sheets, JavaScript libraries) from ADF Library JAR files on the application class path.
By default, static web application resources (including resources in ADF Libraries), such as images, have a staleness period setting of 364 days. This staleness period setting requests that the client not make a request to the server to validate the static web application resources until one of the following events occur:
Staleness period expires
Browser cache no longer contains the static resource
User executes a page refresh
If the client does make a request to the server and the resources have not changed, the server returns a HTTP 304 response (Not Modified) with no body.
You can override the staleness period setting of 364 days for all static web application resources in ADF Libraries by adding initialization parameters to the web.xml
file. Example A-11 demonstrates how to set these initialization parameters using a number of examples.
Example A-11 Staleness Settings for Static Resources in web.xml
<!-- Expires all static resources in 30 days --> <init-param> <param-name>expires</param-name> <param-value>60*60*24*30</param-value> </init-param> <!-- Expires static resources with the .js file extension in 1 day --> <init-param> <param-name>expires.js</param-name> <param-value>60*60*24</param-value> </init-param> <!-- Turns off staleness setting. Use for testing --> <init-param> <param-name>expires</param-name> <param-value>OFF</param-value> </init-param>
Example A-12 shows the default file extensions. You can add additional file extensions by configuring the extensions
parameter value to include the file extensions that you want. Note that you must prepend and append ".
" to the file extension. Example A-12 also shows how you specify visibility for cache control.
Example A-12 Specifying Additional File Extensions and Cache Control
<!-- Specify file extensions for a number of different file formats --> <init-param> <param-name>extensions</param-name> <param-value>.png.jpg.jpeg.gif.js.css.</param-value> </init-param> <!-- Specify visibility for cache control, for example --> <init-param> <param-name>visibility</param-name> <param-value>Public</param-value> </init-param>
JSF servlet and mapping: The servlet javax.faces.webapp.FacesServlet
that manages the request-processing lifecycle for web applications utilizing JSF to construct the user interface.
ADF Faces filter and mapping: A servlet filter to ensure that ADF Faces is properly initialized by establishing a AdfFacesContext
object. This filter also processes file uploads.
The JSF servlet and mapping configuration settings are automatically added to the starter web.xml
file when you first create a JSF project. When you insert an ADF Faces component into a JSF page for the first time, JDeveloper automatically inserts the configuration settings for ADF Faces filter and mapping, and resource servlet and mapping.
For more information, see the "ADF Faces Configuration" appendix in the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.
ADF Logger is a diagnostic tool that you can use in JDeveloper to capture runtime traces messages when you debug an application. You configure the use of this tool by editing the logging.xml
file.
For more information about the logging.xml
file and using the ADF Logger, see Section 36.6, "Using the ADF Logger".