Skip Headers
Oracle® Application Development Framework Developer's Guide
10g Release 3 (10.1.3)
B25386-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

19.2 Using Advanced Parameters (databindings.cpx)

You can use the databindings.cpx file to override or modify the default TopLink data control behavior. This section includes information on the following options:

Refer to Appendix A, "Reference ADF XML Files" for additional information on parameters in the databindings.cpx file.

Use the TopLinkDefinitions Properties dialog (see Figure 19-1) define these parameters on the data control.

Figure 19-1 TopLinkDefinition Properties Dialog

This image shows the TopLink Definition Properties dialog

19.2.1 Performing Deletes First

By default, the TopLink unit of work (see Section 3.8, "Creating and Modifying Objects with a Unit of Work") performs insert operations before delete operations. However, there may be instances in which you must perform the delete operation first.

For example, removing a row with a primary key of 1 and then creating a new row with the same primary key within the same transaction will result in a SQL exception indicating that the row already exists.

To eliminate this problem, use the TopLinkShouldPerformDeletesFirst parameter in the databindings.cpx file to force the unit of work to perform the delete operation first.

Example 19-1 Specifying the TopLinkShouldPerformDeletesFirst Option

...
<Parameter
   name="TopLinkShouldPerformDeletesFirst"
   value="True"
</Parameter
...

19.2.2 Specifying the TopLink Session File

By default, the TopLink session configuration file is named sessions.xml. You can create this file by using the Mapping editor in Oracle JDeveloper (refer to the Oracle JDeveloper online help for more information).

To specify a different sessions configuration file, use the TopLinkSessionsXMLFileName parameter in the databindings.cpx file.

Example 19-2 Specifying the TopLinkSessionsXMLFileName Option

...
<Parameter
   name="TopLinkSessionsXMLFileName"
   value="META-INF/sessions.xml"
</Parameter
...

19.2.3 Specifying the Sequencing

By default, the TopLink unit of work (see Section 3.8, "Creating and Modifying Objects with a Unit of Work") assigns sequence numbers during the commit operation. However, there may be instances in which the sequence number must be displayed in the user interface before the commit operation.

For example, if the sequence number is used as the value of an ID field in a form displayed to the user, you must have the sequence number before committing the transaction.

To eliminate this problem, use the TopLinkSequenceOnCreate parameter in the databindings.cpx file to disable the assigning of the sequnce number during the commit operation of a create transaction

Example 19-3 Specifying the ToplinkSequenceOnCreate Option

...
<Parameter
   name="TopLinkSequenceOnCreate"
   value="False"
</Parameter
...