Sunday, January 6, 2013

ADF: Default Detail, Only One Detail Row can have the default flag set



     1. Create ADF BC components and setup the AM Datamodel for master detail. From the data control panel drop the detail as Master Form and Detail Table.



      2.       Drop the Preferred Flas as a Single Selection Column, Boolean Checkbox on the detail table. Choose the selected and unselected values for the checkbox.







       3.       Edit the properties of the Checkbox, add auto submit to true and set partial trigger on the detail table to the checkbox. Add a value change listener and bind it to a bean proeperty.


        4.       Add logic in value change listener to update all other rows when a new default row is selected.



       5.       Run the application and select a new default row, you can observe that the other default row already selected is cleared.


You can download the complete application here.

ADF: Simple steps create a Shared Application Module instance to improve performance


 Below steps show how to create define a Application Module instance and share it across application.

      1.       Build ADF BC for HR tables Employees, Departments. Create two application Modules EmployeeAM and CommonAM.


        2.       Add Departments View Object instance in CommonAM Data Model.



         3.       Add Employees View Object instance in EmployeeAM Data Model.




        4.       Go to Model project properties -> Business Components -> Application Module instances. Here you’ll see option to add an Application Module instance as shared across Application or Session.




       5.       Now you’ll be able to see the Shared Application Module Instance when declaring view accessors for a view object.



      6.       If you create two different connection pools for each AM, and assign them accordingly in AM configurations.



      7.       Open two separate page in two different browsers you can observe that the Shared Application Module uses a single database connection.


 You can download the complete application here.

      8.       Using this option provides following performance benefits
·         Improved runtime performance.
·         Numbers of queries executed against database are reduced.
·         Memory utilization for storing view object rows is reduced.
Related Posts Plugin for WordPress, Blogger...