ADF:BC to call oracle group function
I am explaining the way to
call the group function using the ADF BC view object. In our day to day
development we will have requirement to show the total of different rows and
min and maximum for any particular columns.
Here I am explaining the
easiest way for using the group function from adf viewobejct.
Best part of these function
is that you call on any type view no matter you populated view object using sql
query or programmatic way or you have static view object.
Implementation of such
function remains same.
Let me first show desired
output:
Configuration for View Obejct
Add View Accessor- Open view object
- Select the View Accessor

- Click
on
icon -
Select the view object and click on the move to right icon output will be like
- Your view accessor name id EmployeeView1
Adding attribute to view object
- Add attribute to view object
- Define type as BigDecimal/Interger based on requirement
- Select the value type as expression
- Provide the expression like EmployeeView1.sum("Sal") where EmployeeView1 is view accessor name, sum is oracle group function and Sal is attribute on which we need to calculate the sum.
Creating table
- Select the viewobejct from datacontrol tab and drag drop of jspx page as table.
- Select the column for which you want to show the total.
- Add the footer facet to column
Define the footer facet
- Go to page defn and attribute binding
- Now add the input text with attribute mapping created
- In above code I have define 3 attribute for Min. Max and total.Run you application and you will get your desired output for total, min, max value.
Application source Click Here



