Building entity objects connected through association and view objects linked through view links at runtime

In this post I'm sharing yet another sample on building dynamic business components. The sample attached in this post covers APIs for building entity objects connected through associations as well as entity object based  view objects linked through view links.  In fact, the credit for this sample goes to my colleague Sung Im (Architect - ADF BC) who is always helpful for me on all queries or discussions centered around dynamic business components. Many thanks Sung !

This sample will teach you the following:
  • APIs for building entity objects at run time
  • APIs for building association between  entity objects at run time
  • APIs for building view objects at run time
  • APIs for building view links at run time
Download 

You can download the sample workspace from here. [Runs with Oracle JDeveloper 11g R2  11.1.2.4.0 and Oracle XE].
To know the APIs take a look at DynamicBCExample.java. The method DynamicBCExample::doProcess(...) builds entity objects for  DEPARTMENTS and EMPLOYEES table, builds association between them, and then generates view objects with view links. To test, run test.jsf and click on the command button, watch the server console to see the run time logs (sorry, no 'nice' UI is added for this example application). On a related note, you need to have MDS configured for using this stuff  in your App. See the MDS entry in adf-config.xml file in the sample for details.

To learn more about dynamic ADF BC things refer  my previous posts as well:
Learn More ...

There are a lot more points like this. If  you are curious to learn the internals of the ADF Business Components and ADF Binding Layer,  the following book is for you - Oracle ADF Real World Developer’s Guide.
More details about this book can be found in this post- http://www.jobinesh.com/2012/10/oracle-adf-real-world-developers-guide.html

Comments

  1. Hi Jobinesh,

    An other dynamic excellent sample.
    However, it's not applicable for me because all your samples deals with Business components objects built from scratch. This sample would be so usefull if you can deal with existing BC (add a field for example).

    I posted a technical request on METALINK with a use case, about 15 days ago (based on your samples) :

    SR 3-7210796351 : PDefEntityObject and PDefViewObject don't work for existing Business components

    I'm waiting for an answer.

    I tried many solutions but unfortunately all failed.

    Thanks Jobinesh,
    Christophe

    ReplyDelete
  2. Hi Jobinesh,

    Could you confirm whether this post is still valid for ADF 12.1.3?
    (I see ALL Departments listed for every Employee in the console log)

    thanks,
    Miroslaw

    ReplyDelete

Post a Comment