Programmatically Populate View Objects Based on ArrayList of custom Bean Class In Oracle ADF

Lets say you have a Custom Bean Class EmpData defined as:


And you wish to use the same as a View Object, Then below is the method for the same:

First create a Proxy View Object Class:

Now Create a View Object where it is populated programmatically:




Now Edit the View Object Impl Class:


Now you can easily use the View Objects as a normal View Object to be used in View Controller.

Cons: The getDataFromService method will be called again and again whenever the View Object is needed. So try to keep the source separate and apply some tuning logic to the same in order to improve performance of system.

Original Referrence Source

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.