Oracle® Application Development Framework Developer's Guide
10g Release 3 (10.1.3) B25386-01 |
|
![]() Previous |
![]() Next |
The <pageName>PageDef.xml files are created each time you insert a databound component into a web page using the Data Control 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. Therefore, you will have one XML file for each databound web page.
The PageDef.xml file appears in the /src/view directory of the ViewController project folder. The Application Navigator displays the file in the view package of the Application Sources folder. 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.
There are important differences in how the PageDefs are generated for methods that return a single-value and a collection, so these are listed separately below.
The toplevel 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.srdemo.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-7 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-7 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 it's 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 mtehod 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-4 describes the attributes of the toplevel <pageDefinition> element.
Table A-4 Attributes of the PageDef.xml File <pageDefinition> Element
Table A-5 describes the attributes of the child element of <parameters>.
Table A-5 Attributes of the PageDef.xml File <parameters> Element
Element Syntax | Attributes | Attribute Description |
---|---|---|
id |
Unique identifier. May be referenced by ADF bindings |
|
|
option |
Indicates the usage of the variable within the binding container:
|
|
readonly |
Indicates whether the parameter value may be modified or not. Set to true when you do not want the application to modify the parameter value. |
|
value |
A default value, this can be an EL expression. |
Table A-6 describes the attributes of the PageDef.xml <executables> elements.
Table A-6 Attributes of the PageDef.xml File <executables> Element
Element Syntax | Attributes | Attribute Description |
---|---|---|
BeanClass |
Identifies the Java type of beans in the associated iterator/collection. |
|
|
CacheResults |
If true, manage the data collection between requests. |
|
DataControl |
The data control which interprets/returns the collection referred to by this iterator binding. |
|
id |
Unique identifier. May be referenced by any ADF value binding. |
|
MasterBinding |
Reference to the methodIterator (or iterator) that binds the data collection that serves as the master to the accessor iterator's detail collection. |
|
ObjectType |
This is used for ADF BC only. A boolean value determines if the collection is an object type or not. |
|
RangeSize |
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 RangeSize when you want to work with an entire set or when you want to limit the number of data objects to display in the page. Note that the values -1 and 0 have specific meaning: the value -1 returns all available objects from the collection, while the value 0 will return the same number of objects as the collection uses to retrieve from its data source. |
|
Refresh |
Determines when and whether the executable should be invoked. Set one of the following properties as required:
|
|
RefreshCondition |
An EL expression that when resolved, determines when and whether the executable should be invoked. For example, ${!bindings.findAllServiceRequestIter.findMode} resolves the value of the findModel on the iterator in the ADF binding context AllServiceRequest. Hint: Use the Property Inspector to create expressions from the available objects of the binding context (bindings namespace) or binding context (data namespace), JSF managed beans, and JSP objects. |
Binds |
Determines the action to invoke. This may be on any actionBinding. Additionally, in the case, of the EJB session facade data control, you may bind to the finder method exposed by the data control. Built-in actions supported by the EJB session facade data control include:
|
|
|
id |
Unique identifier. May be referenced by any ADF action binding |
|
Refresh |
see Refresh above. |
|
RefreshCondition |
see RefreshCondition above. |
BeanClass |
Identifies the Java type of beans in the associated iterator/collection |
|
|
BindingClass |
This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3. |
|
Binds |
see Binds above. |
|
CacheResults |
see CacheResults above |
|
DataControl |
Name of the DataControl usage in the bindingContext (.cpx) which this iterator is associated with. |
|
DefClass |
Used internally for testing. |
|
id |
Unique identifier. May be referenced by any ADF value binding. |
|
ObjectType |
Not used by EJB session facade data control (used by ADF Business Components only). |
|
RangeSize |
see RangeSize above |
|
Refresh |
see Refresh above |
|
RefreshCondition |
see RefreshCondition above |
id |
Unique identifier. In the case of <page>, refers to nested page/region that is included in this page. In the case of the <variableIterator> executable, the identifier may be referenced by any ADF value binding |
|
|
path |
Used by <page> executable only. Advanced, a fully qualified path that may reference another page's binding container. |
|
Refresh |
see Refresh above |
|
RefreshCondition |
see RefreshCondition above |
Table A-7 describes the attributes of the PageDef.xml <bindings> element.
Table A-7 Attributes of the PageDef.xml File <bindings> Elements
Element Syntax | Attributes | Attribute Description |
---|---|---|
Action |
Fully qualified package name. Identifies the class for which the data control is created. In the case of the EJB session facade, this the session bean |
|
|
BindingClass |
This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3. |
|
DataControl |
Name of the DataControl usage in the bindingContext (.cpx) which this iteratorBinding or actionBinding is associated with. |
ApplyValidation |
Set to True by default. When true, controlBinding executes validators defined on the binding. You can set to False in the case of ADF BC, when running in local mode and the same validators are already defined on the corresponding attribute. |
|
|
BindingClass |
This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3. |
|
ControlClass |
Used internally for testing purposes. |
|
CustomInputHandler |
This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding. |
|
DefClass |
Used internally for testing. |
|
id |
Unique identifier. May be referenced by any ADF action binding |
|
IterBinding |
Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated. |
|
NullValueId |
Refers to the entry in the message bundle for this bindingContainer that contains the String to indicate the null value in a list display. |
ApplyValidation |
Set to True by default. When true, controlBinding executes validators defined on the binding. You can set to False in the case of ADF BC, when running in local mode and the same validators are already defined on the corresponding attribute. |
|
|
BindingClass |
This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3. |
|
BoolVal |
Identifies whether the value at the zero index in the static value list in this boolean list binding represents true or false. |
|
ControlClass |
Used internally for testing purposes. |
|
CustomInputHandler |
This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding. |
|
DefClass |
Used internally for testing. |
|
id |
Unique identifier. May be referenced by any ADF action binding |
|
IterBinding |
Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated. |
|
ListIter |
Refers to the iteratorBinding that is associated with the source list of this listBinding. |
|
ListOperMode |
Determines if this list binding is for navigation, contains a static list of values or is a LOV type list. |
|
NullValueFlag |
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. |
|
NullValueId |
Refers to the entry in the message bundle for this bindingContainer that contains the String to indicate the null value in a list display. |
ApplyValidation |
Set to True by default. When true, controlBinding executes validators defined on the binding. You can set to False in the case of ADF BC, when running in local mode and the same validators are already defined on the corresponding attribute. |
|
|
BindingClass |
This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3. |
|
BoolVal |
Identifies whether the value at the zero index in the static value list in this boolean list binding represents true or false. |
|
ChildAccessorName |
The name of the accessor to invoke to get the next level of nodes for a given Hierachicahl Node Type in a tree. |
|
ControlClass |
Used internally for testing purposes. |
|
CustomInputHandler |
This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding. |
|
DefClass |
Used internally for testing. |
|
id |
Unique identifier. May be referenced by any ADF action binding |
|
IterBinding |
Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated. |
|
NullValueId |
Refers to the entry in the message bundle for this bindingContainer that contains the String to indicate the null value in a list display. |
ApplyValidation |
Set to True by default. When true, controlBinding executes validators defined on the binding. You can set to False in the case of ADF BC, when running in local mode and the same validators are already defined on the corresponding attribute. |
|
|
BindingClass |
This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3. |
|
ControlClass |
Used internally for testing purposes. |
|
CustomInputHandler |
This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding. |
|
DefClass |
Used internally for testing. |
|
id |
Unique identifier. May be referenced by any ADF action binding |
|
IterBinding |
Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated. |
|
ListIter |
Refers to the iteratorBinding that is associated with the source list of this listBinding. |
|
ListOperMode |
Determines if this list binding is for navigation, contains a static list of values or is a LOV type list. |
|
NullValueFlag |
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. |
|
NullValueId |
Refers to the entry in the message bundle for this bindingContainer that contains the String to indicate the null value in a list display. |
|
StaticList |
Defines a static list of values that will be rendered in the bound list component. |
Action |
Fully qualified package name. Identifies the class for which the data control is created. In the case of the EJB session facade, this the session bean |
|
|
BindingClass |
This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3. |
|
ClassName |
This is the class to which the method being invoked belongs. |
|
CustomInputHandler |
This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding. |
|
DataControl |
Name of the DataControl usage in the bindingContext (.cpx) which this iteratorBinding or actionBinding is associated with. |
|
DefClass |
Used internally for testing. |
|
id |
Unique identifier. May be referenced by any ADF action binding |
|
InstanceName |
A dot-separated EL path to a Java object instance on which the associated method is to be invoked. |
|
IsLocalObjectReference |
Set to True if the instanceName contains an EL path relative to this bindingContainer. |
|
IsViewObjectMethod |
Set to True if the instanceName contains an instance-path relative to the associated data control's Application Module. |
|
IterBinding |
Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated. |
|
MethodName |
Indicates the name of the operation on the given instance/class that needs to be invoked for this methodActionBinding. |
|
RequiresUpdateModel |
Whether this action requires that the model be updated before the action is to be invoked. |
|
ReturnName |
The EL path of the result returned by the associated method. |
ApplyValidation |
Set to True by default. When true, controlBinding executes validators defined on the binding. You can set to False in the case of ADF BC, when running in local mode and the same validators are already defined on the corresponding attribute. |
|
|
BindingClass |
This is for backward compatibility to indicate which class implements the runtime for this binding definition. Ignored in JDeveloper 10.1.3. |
|
ControlClass |
Used internally for testing purposes. |
|
CustomInputHandler |
This is the class name for a oracle.jbo.uicli.binding.JUCtrlValueHandler implementation that is used to process the inputValue for a given value binding. |
|
DefClass |
Used internally for testing. |
|
DiscrValue |
Indicates the discriminator value for a hierarchical type binding (type definition for a tree node). This value is used to determine if a given row in a collection being rendered in a polymorphic tree binding should be rendered using the containing hierarchical type binding. |
|
id |
Unique identifier. May be referenced by any ADF action binding |
|
IterBinding |
Refers to the iteratorBinding instance in this bindingContainer to which this binding is associated. |
|
NullValueId |
Refers to the entry in the message bundle for this bindingContainer that contains the String to indicate the null value in a list display. |
This is the page definition file that's created when you drop the method return User from the method findUserByEmail() in the Data Control Palette, SRPublicFacade.
Example A-8 PageDef for findUserByEmail()
<?xml version="1.0" encoding="UTF-8" ?> <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="10.1.3.36.7" id="untitled1PageDef" Package="project1.pageDefs"> <parameters/> <executables> <variableIterator id="variables"/> <methodIterator id="findUserByEmailIter" Binds="findUserByEmail.result" DataControl="SRPublicFacade" RangeSize="10" BeanClass="oracle.srdemo.model.entities.User"/> </executables> <bindings> <methodAction id="findUserByEmail" InstanceName="SRPublicFacade.dataProvider" DataControl="SRPublicFacade" MethodName="findUserByEmail" RequiresUpdateModel="true" Action="999" ReturnName="SRPublicFacade.methodResults.SRPublicFacade_dataProvider_findUserByEmail_result"> <NamedData NDName="emailParam" NDValue="mkorf@oracle.com" NDType="java.lang.String"/> </methodAction> <table id="findUserByEmail1" IterBinding="findUserByEmailIter"> <AttrNames> <Item Value="city"/> <Item Value="countryId"/> <Item Value="email"/> <Item Value="firstName"/> <Item Value="lastName"/> <Item Value="postalCode"/> <Item Value="stateProvince"/> <Item Value="streetAddress"/> <Item Value="userId"/> <Item Value="userRole"/> </AttrNames> </table> </bindings> </pageDefinition>
This is the page definition file that's created when you drop the User node from the findAllStaff() method in the Data Control Palette, SRPublicFacade. This one is a collection.
Example A-9 PageDef for Method that Returns a Collection
<?xml version="1.0" encoding="UTF-8" ?> <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="10.1.3.36.7" id="untitled2PageDef" Package="project1.pageDefs"> <parameters/> <executables> <methodIterator id="findAllStaffIter" Binds="findAllStaff.result" DataControl="SRPublicFacade" RangeSize="10" BeanClass="oracle.srdemo.model.entities.User"/> </executables> <bindings> <methodAction id="findAllStaff" InstanceName="SRPublicFacade.dataProvider" DataControl="SRPublicFacade" MethodName="findAllStaff" RequiresUpdateModel="true" Action="999" ReturnName="SRPublicFacade.methodResults.SRPublicFacade_dataProvider_findAllStaff_result"/> <table id="findAllStaff1" IterBinding="findAllStaffIter"> <AttrNames> <Item Value="city"/> <Item Value="countryId"/> <Item Value="email"/> <Item Value="firstName"/> <Item Value="lastName"/> <Item Value="postalCode"/> <Item Value="stateProvince"/> <Item Value="streetAddress"/> <Item Value="userId"/> <Item Value="userRole"/> </AttrNames> </table> </bindings> </pageDefinition>