Adding a View Link Instance with a New Association-Based Definition at Runtime

If the following hold:

then you can you can place the view object instances into a master-detail relationship at runtime by using createViewLinkFromEntityAssocName(). The view link's definition will be based on the association; for more information, see About Oracle ADF View Links.

To add a view link member with a new association-based definition at runtime:

  1. 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";

  2. Create a String containing the package-qualified name of the association on which you want to base the view link. For example, if the association is called CustOrdAssoc and is in the package orderentry.businessdomain, you would use the following code:

    String assocDefName = "orderentry.businessdomain.CustOrdAssoc";

  3. Pass these strings, along with the master and detail view object instances, into createViewLinkFromEntityAssocName(). 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.createViewLinkFromEntityAssocName(
      vlInstanceName, assocDefName, allCustVO, custOrdVO);                

Ways to Change View Object Relationships at Runtime
Adding a View Link Instance Based on a Predefined View Link 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 Associations
About View Objects
About Application Modules
About View Object and View Link Instances
Finding View Object Instances in the Data Model
Creating an Association
Creating a Many-to-Many Association

 

 

 

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