Tuesday, July 8, 2014

Implementing Auto Suggest in ADF

Took help from http://www.oracle.com/technetwork/developer-tools/jdev/autosuggest-090094.html
Requirement is to auto suggest users while using input field . In this case, there is an inputbox for employee's first name (using the HR schema) where upon entering the character, popup suggests user for the list of employees with the first name starting with the character entered as shown in the figure.


View Layer:
1. Create a jspx page with input box, and add the clientListener attributes to the input box

2. define the af:popup segment in the jspx with selectOneListbox option. Function written on keyup and click of input box would populate the List box in this case

Model Layer:
1. Create the EmployeeVO with View Criteria as:


    and write the java method to populate the Employee List(can be found in the code attached)
2. The backing bean would fetch the List from AppMod using method binding:


Run the jspx and result would be as expected :)


Code can be found @ Auto Suggest


No comments:

Post a Comment