Skip Headers
Oracle® Fusion Middleware Desktop Integration Developer's Guide for Oracle Application Development Framework
11g Release 1 (11.1.1.7.0)

Part Number E10139-06
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

G Using the ADF Desktop Integration Model API

There may be certain use cases where you want to allow uploading ADF Table data even when there are no rows available in a tree binding. This appendix describes how to use the ADF Desktop Integration Model API library 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 appendix includes the following sections:

G.1 About the Temporary Row Object

Each ADF Table component is bound to a tree binding defined within a page definition. Each tree control 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:

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. 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.

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.

G.2 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. 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 more information about the classes and methods available in the API, see Section G.3, "ADF Desktop Integration Model API Classes and Methods."

G.2.1 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 Application Navigator, 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 G-1 Add Library Dialog

    Add Library Dialog showing Model API library.
  4. Click OK. The library name adds to the Classpath Entries list.

  5. Click OK to close the Project Properties dialog box.

G.3 ADF Desktop Integration Model API Classes and Methods

The ADF Desktop Integration Model API library contains one public class that contains APIs for retrieving temporary row objects.

G.3.1 The oracle.adf.desktopintegration.model.ModelHelper Class

The ModelHelper class is a public class that exposes Model APIs. The following sections describe the methods available in the class.

G.3.1.1 The getAdfdiTempChildRow Method

The method is used to lookup temporary child row object (ViewRowImpl object) associated with a particular master row. When required, the servlet code creates the temporary ViewRowImpl object and stores attribute values when there are no actual ViewRowImpl objects available.

The method returns the temporary child ViewRowImpl object containing any attribute values sent from worksheet.

Method Syntax

public static final ViewRowImpl getAdfdiTempChildRow(ViewRowImpl masterRow, java.lang.String childAccessor)

Parameters

  • masterRow – master row object

  • childAccessor – child attribute name

G.3.1.2 The getAdfdiTempRowForView Method

The method is used to lookup temporary child row object (ViewRowImpl object) associated with a particular view. When required, the servlet code creates the temporary ViewRowImpl object and stores attribute values when there are no actual ViewRowImpl objects available.

The method returns the temporary child ViewRowImpl object containing any attribute values sent from worksheet.

Method Syntax

public static final ViewRowImpl getAdfdiTempRowForView(ApplicationModuleImpl am,java.lang.String viewDefName)

Parameters

  • am – application module instance

  • viewDefName – view definition name

G.3.1.3 The getChildViewDef Method

The method is used to lookup polymorphic child view definition if the view link destination attributes specify one or more child discriminator attributes. The master row source attributes lookup the correct polymorphic child view definition through ViewObjectImpl.findViewDefFromDiscrValues API. If no child discriminator attributes are defined, or the child view is non-polymorphic, the default child ViewDefImpl object is returned.

The method returns the temporary child ViewRowImpl object containing any attribute values sent from worksheet, or returns null if the object is not found.

Method Syntax

public static final ViewDefImpl getChildViewDef(ViewRowImpl masterRow,java.lang.String childAccessor)

Parameters

  • masterRow – master row object

  • childAccessor – child attribute name