Yes, building applications using Oracle ADF is really quick. This post depicts how quickly you can build an employee search page with following features.
-
Search using AND or OR condition among the criteria.
-
Add additional search fields.
-
Search based on STARTS WITH, ENDS WITH and CONTAINS.
-
Save the search criteria.
-
Reorder the search criteria fields.
-
Search to get the results in a Table.
-
Filter the search results based on a value for any of the columns.
-
Order based on any of the columns in the results table.
-
Fetch more results as you scroll down, aka server side paging.
-
Shuffle columns in the table.
In this post I am considering creation of an Employee search page based on Employees table present in Oracle XE database. To start with you need to create an ADF project with database connection to the HR schema. The project contains a Model project and a ViewController project.
-
Creating Business Services
Within the model project create new -> Business components from table. As shown in below window, query for EMPLOYEES table, click Next.
Provide a View name and click Next till you reach Summary page and click on Finish.
Till now the steps performed creates an Entity Object, a View Object and an Application Module with default name AppModule. This application module would be present as a datacontrol.
-
Creating User Interface
Create a jspx page within ViewController project, and drag and drop the “All Queriable Attributes” Named Criteria onto the page.
While drop the Named Criteria select Query, and then ADF Query Panel with Table. On the Create table wizard, choose the selection that are relevant. In this example, I have chosen Single Row, Enable Sorting and Enable Filtering. Click OK button.
That’s it, you have the employee search page ready. To beatify the page little bit, I have set Rows and Columns values of the query region to 3/4 and table column stretching property to multiple. Now run the application to see below UI.
Below is a basic search functionality.
Below screen shows advanced search functionality.
You can use the button present in both Basic and Advanced search regions to
-
Search using AND or OR condition among the criteria.
-
Add additional search fields.
-
Search based on STARTS WITH, ENDS WITH and CONTAINS.
-
Save the search criteria.
-
Reorder the search criteria fields.
-
Search to get the results in a Table.
Use the filter text place holder present above each column to filter the data. Click on column header to order the results. In addition you can drag and drop column to shuffle their positions. There are many more functionalities that you can explore using the inbuilt ADF features. While drag dropping the Named Search criteria you can explore other options to build tree tables and quick query regions as well.