F Using the ADF Desktop Integration Model API

Use the ADF Desktop Integration Model API in custom Java code to access the attribute values sent from the client during the upload process when there are no actual rows available.

This API is for the use cases where you want to allow uploading ADF Table data even when there are no rows available in a tree binding.

This appendix includes the following sections:

About the Temporary Row Object

During upload, ADF Desktop Integration creates a temporary row object and stores the values uploaded from the worksheet row. Using the ADF Desktop Integration Model API, you can write custom Java code to access the temporary row object and collect its values.

Each ADF Table component is bound to a tree binding defined within a page definition. Each tree binding has one (or more) tree nodes defined. For parent-child relationships, the tree binding has two nodes, one for parent table and another for child table. At runtime, the ADF Table component displays both parent and child attributes within each worksheet row. On upload, ADF Desktop Integration sets attribute values to both the parent and child nodes.

In certain situations, a particular tree node may not have actual data rows available during Table.Upload request processing. Two common scenarios where a tree node may not have data are:

  • The tree node's iterator result set does not have any data rows available. This could be because of a query returning zero rows.

  • In a parent-child relationship, if the foreign key has not been populated in the parent table, the link between parent and child tree node may not contain actual rows.

There may be certain cases when, even though there is no actual row available on the server, you still want to allow the end user to enter values in the worksheet and upload them to the server.

To call your custom Java code during upload, you must expose your custom Java code through a pageDef action binding and then configure the ADF Table component's UpdateRowActionID or InsertAfterRowActionID to point to the pageDef action binding.

About ADF Desktop Integration Model API

While data is being uploaded, if a tree node of the ADF Table component contains no actual rows, the ADF Desktop Integration remote servlet creates a temporary row object to store the attribute values.

If you want to access the temporary row object and its attribute values, you must write custom Java code that uses the ADF Desktop Integration Model API library.

Note:

The ADF Desktop Integration Model API is not supported for EJB or Toplink data controls.

For information about the classes and methods available in the API, see Java API Reference for Oracle ADF Desktop Integration.

How to Add ADF Desktop Integration Model API Library to Your JDeveloper Project

You typically add the ADF Desktop Integration Model API Library to your application's data model project. The library is an independent library, not included with any feature. You can add it through Project Properties dialog box.

To add ADF Desktop Integration Model API library to your project:

  1. In the Applications window, right-click the data model project and choose Project Properties.
  2. In the Project Properties dialog, select Libraries and Classpath to view the list of libraries available.
  3. Click Add Library and in the Add Library dialog, select the ADF Desktop Integration Model API library.

    Figure F-1 Add Library Dialog

    This image is described in the surrounding text
  4. Click OK. The library name adds to the Classpath Entries list.
  5. Click OK to close the Project Properties dialog box.