Wednesday 27 July 2016

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


Hi everyone this is the second part of  "Programmatically execute view criteria in ADF (With two different Approaches ) "

In first part i have explained in detail how you people can execute the view Criteria in AppModuleImpl class and ViewObjectImpl class
if you don't have seen yet please visit the following link

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

In this post i simply show the code and which method we should adopted

1) Execute View Criteria in AppModuleImpl class 



2) Execute View Criteria in ViewObjectImpl class 





The best place to execute the View Criteria 

In my point of view The view object Impl class is the best place to execute the view criteria
because in this way we can manage our application in a better way
Secondly we need less code in View object Impl class to execute View criteria



Please Feel Free To Ask if you Face any Difficulty 
Like and share to help others
Thanks
Date 27-06-2016

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

Get Multiple Selected Rows In ADF

Hi everyone In this Post i will describe how to get multiple selected rows in  View Object Impl Class

you can implement this logic to multiple deletion or to update multiple rows

For this example i am using jdeveloper 11.1.2.3.0

First of all add a Transient attribute in view object with Data type Boolean and make it Update able Always


Then click on Ui Hints Tab and select Check Box from Control Type



Now create a JSF page drop a panel collection from component palette
then drop  VO on JSF page as Read only table
move the Selection Attribute at the top
and make sure the selection of Multi Rows



when your drop the VO on JSF page the Selection Attribute not appears as a check Box
so right click on inside of selection attribute and select Delete



Now from Data Control select the Selection attribute and drop it as a check box
like this


Now go to java  of view object and create java classes of view object
to create classes click on pencil i con then checked the check boxes in the following way



Now open the view object "EmployeesViewImpl" class



and the at the end of this class write the following method


To add this method to the client Interface of the view object
click on java Tab of  view object
click on pencil icon
then select and move method





Now to access this method in been follow the following steps
1) First add this method in client side bindings , for this
click on bindings of JSF page
Then from bindings click on green + icon
Then from Insert Item window select method action and click  OK








After clicking OK "create Action binding" windows appear in front  of you
Expend the "AppModuleDataControl"
Then select "EmployeesView1" and you will see the "getSelectedRow()"  method
Now just click OK
and then click on Design Tab



Now on JSF page
drag and drop a button from component palette
then create a been with request scope and create a method in been name as "button method"
then bind the button with been method ("buttonMethod")
Now in "buttonMethod " call the "getSelectedRow" Method in the following way

firstly copy the id of the method from bindings



Then write the following code in been method


Now just Run you Application select some rows hit the "getRows" button and see the result in log file




Please Feel Free To Ask if you Face any Difficulty 
Like and share to help others
Thanks
Date 26-07-2016

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,       ...