Objective :
Most often you come across a requirement of search panel in OIM, for user search which is already available in OIM. Let’s say we have a requirement of searching a particular employee or listing all the employees and clicking on the employee id it should allow to edit the employee details .We will implement the same thing using ADF as follows .In the previous article we have seen how to implement UI page in ADF.
1) Go to adfc-config.xml under Application Navigator>Web Content>WEB_INF folder > adfc-config.xml
Drop content onto the blank space from the Component Palette, Resource Palette, or Application Navigator
2) Drag and drop View from the components Palette
We will create one more page View2. We will change the name rename View1 to Search and View2 to as Edit. (Exclamatory mark indicates the warning that the page is not created).
Also, the warning is shown that the page is not created only the icon is available here. We need to double click to create the page before that we will complete the navigation. we need navigation from Search page to Edit page whenever there is an action called edit. Also, we will have navigation from Edit page to Search page whenever there is action called Search. This will complete the navigation as shown in below screenshot.
3)Double Click on the Search icon. The search page will be created.
4) From the Data Controls if you expand VO you will see Named Criteria. In Named Criteria you will see All Queriable Attributes, drag and drop it on the Search page
5) It will ask what you want to create. We will select ADF Quick Query with Table. Create> Query> ADF Query Panel with table
6) Now it will ask what all columns you want to display in the table. We will also check the Enable String, Enable Filtering options and select the Single Row selection . We will keep all the columns to be displayed and click on OK .
Once you click on OK the search panel and results table will be added
7) You can see that all the fields are as Output Text , but we want when the user clicks on Employee ID he should be navigated to Edit page
So we will replace Output Text with a link . You can see in the right panel that each column has Output Text which we don’t want
So we will search for link in Search panel .
Select the ADF link , drag it and drop it on the column in Search panel
8) Copy the value of the Output Text and paste it in the command link text so that it displays Employee ID
9) Delete the Output Text - Right-click> Delete. Now we have only link
We did it only for the first row it automatically copies to all the rows , so no need to repeat . This feature is know as auto-stamping .
10) Select adf command link . In properties window there is an Action drop down list , select the action edit so that it goes to edit page .
We are done with first page now .
11) Double click on Edit page and click on OK
12) Right click on edit page and Select Form>ADF Form
13) Uncheck Include Navigation Controls button and click on OK
14) Also we need a button that will take us back to the Search page . So search for a button in search panel
15) Drag and drop the ADF button on the Edit page
Change the text of the command button Text to Back and set the Button Action to search page .
16) Save and go to adf-config.xml file . Right click and select Run option .
17) After it’s Successfully deployed the Search page will be displayed on the browser
18) In the Search panel, it will ask you if you want to search records based on which field. Select the value for searching the record based on it.
Also, you can perform the blank search. All the employee details will be listed on blank search based on Employee id.
19) You can sort, filter the records also. For example, if you want to know employees whose first name is starting with D, then enter the character D in the firstName column, all employees with First name starting with D will be listed.
20) To edit a particular record click on the EmployeeID listed . For example click on 115 ( Employee Id)
It will take you to the Edit page .You can do the changes required and click on Submit . It gets saved to the database .If you want to come back the search page click on Back button
So it’s simple to develop the application using ADF wherein not much coding is required everything is UI based .
FAQ’s :
Q:Whi le filtering in UI does it makes a call to the server or there is one time server call and it does everything on the UI .
Answer: It makes one time call to server & everything is done within UI itself , there is no frequent calls to the server .