Adding a View Link Instance Based on a Predefined View Link at Runtime

If you have two view object instances in your data model, and you have a view link defined between their view object definitions, you can place the view object instances into a master-detail relationship at runtime by using createViewLink().

To add a view link instance based on a predefined view link at runtime:

  1. Create a String containing the package-qualified name of the view link definition. For example, if the view object definition is called CustOrdLink and is in the package orderentry.datamodel, you would use the following code:

    String vlDefName = "orderentry.datamodel.CustOrdLink";

  2. Create a String containing the name you want to give the view link instance in the data model. For example, if this instance is to be called CustOrdLink1, you would use the following code:

    String vlInstanceName = "CustOrdLink1";

  3. Pass these strings, along with the master and detail view object instances, into createViewLink(). For example, if the master instance is stored in a variable called allCustVO, and the detail instance is stored in a variable called custOrdVO , you could use the following code:
    ViewLink vl = myAM.createViewLink(
      vlInstanceName, vlDefName, allCustVO, custOrdVO);                

Ways to Change View Object Relationships at Runtime
Adding a View Link Instance with a New Association-Based Definition at Runtime
Adding a View Link Instance with a New View Object Attribute-Based Definition at Runtime
Removing a View Link Instance at Runtime
About Oracle ADF View Links
About Oracle ADF View Objects
About Oracle ADF Application Modules
About View Object and View Link Instances
Finding View Object Instances in the Data Model
Creating a View Link Definition
Creating a Many-to-Many View Link Definition

 

 

 

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