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:

EmpData

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:
ProxyDataSourceObject

Now Create a View Object where it is populated programmatically:
Programmatic_VO

Programmatic_VO_attribs

Programmatic_VO_Java

EmpDataCustomVO

Now Edit the View Object Impl Class:

EmpDataCustomVOImpl

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