Traversing View Links

You can use a view link to obtain detail data for a master row. There are two ways to do this:

To traverse a view link using the data model:

  1. Ensure that you have added master and detail view object instances to the data model.
  2. In your client or service method, find the master and detail view object instances.
  3. As you navigate through the master view object's result set, the detail view object will expose only detail rows. For more information, see the related topics list.

To traverse a view link using view link accessors:

  1. Ensure that you have added the view object instance to the data model. You do not need to add an instance of the detail view object.
  2. Once you have obtained any master row (for more information, see the related topics list), you can obtain detail rows by passing the accessor name into getAttribute() on the master row.

    For example, if custVO is an instance of the view object with definition CustomersView, and custRow is a row of custVO and CustOrdLink is a view link definition between CustomersView and OrdersView and the destination accessor for the view link is OrdersForCustomer , then you could obtain all of the detail rows for custRow using the following code:

    RowIterator orders = custRow.getAttribute("OrdersForCustomer");

  3. You can navigate through the rows in this RowIterator, just as you would a view object instance.

Accessing Data from Clients
About Oracle ADF View Links
About Oracle ADF View Objects
About Oracle ADF Application Modules
About View Object and View Link Instances
Creating a View Object Definition
Creating a View Link Definition

 

Copyright © 1997, 2004, Oracle. All rights reserved.