Tuesday 26 July 2016

Programmatically execute view criteria in ADF (With two different Approaches ) part 1

Hi everyone in this post we will see two different approaches to call the view criteria Programmatically

1) In First Method we can execute View criteria in AppModuleImpl Class
2) In Second Method we can also do the same thing in View object Impl class with less code

1) Execute Through AppModuleImpl class

Suppose you create a view criteria , 'select employees where departmetnId =:bind_parameter' on EmployeesView

To create view criteria just click on query tab of EmployeesView
1) Then click on green + icon of view criteria
2) Then click on group and select Add items
3) Then Select "DepartmentId" from Attributes
4) Then create a bind parameter by click on green + icon



Now to generate AppModuleImpl class gust select java tab of AppModule
then click on pencil icon
and select the check box just like in the following pic




Now at the end of AppModuleImpl class write the following method



Now call this method in been and pass the parameter in been
If you don't know how to call AppModuleImpl class method in been then plz visit the following link

http://adfindepth.blogspot.com/2016/06/how-to-call-appmoduleimpl-class-method_26.html


2) Execute Through View Object Impl class

For this we need  to create view object impl class , for this example we are using EmployeeView
So to create java classes of  EmployeeView , click on java tab of
Then click on pencil icon
and select the check box like in picture



Now at the end of EmployeesViewImpl class write the following code



Now add this method in Client Interface of EmployeeView



Now access this method in been and execute it

Continue ...............
Link of part 2  (Describe the difference)

http://adfindepth.blogspot.com/2016/07/programmatically-execute-view-criteria_27.html






 Please Feel Free To Ask if you Face any Difficulty 
Like and share to help others
Thanks

Date 27-07-2016

No comments:

Post a Comment

Query to get Business unit (ORGANIZATION_ID) Detail in oracle Fusion

  SELECT HAO.ORGANIZATION_ID AS BUSINESS_UNIT_ID,         HAOT.NAME,         HAO.BUSINESS_GROUP_ID,         HAO.EFFECTIVE_START_DATE,       ...