Friday, March 15, 2013

Enabling Multi Selection in af:query component


In some cases, we might need to allow user to select multiple values while searching data using search functionality. To accomplish this requisite, ADF framework provides a declarative approach. I have given a sample example using HR schema available with XE. Follow the steps mentioned below.

  1.  Create Employees & Departments View Objects
  2. Go to Employees VO attributes section and add LOV to DepartmentId attribute based on values from Departments VO
  3. Go to Employees VO query section and add view criteria For ex ‘EmployeesVOCriteria’
  4. Inside the view Criteria, add DepartmentId attribute. Move to UI Hints tab, under Criteria Item UI Hints section, select DepartmentId, and check ‘Support Multiple Value Selection’. Save.
  5. Go to UI project, add a page, and drag EmployeesVOCriteria as Query Panel into page.
  6. Run the page
k





     


5 comments:

  1. That good blog. I have already done this in my project.But now I have problem that when user login we have to select multiple value by default depend on user role i.e. select marketing,sales for one user. do you know any solution.

    ReplyDelete
    Replies
    1. I have not tried it. But I found some info related your problem on below link. Check if this helps.

      http://adf-linux-learning.blogspot.in/2012/04/adf-how-to-set-default-values-in.html

      Delete
    2. Hi,
      How do i programming to get list of value from select may choice in af query

      Delete
  2. Really good,i have implemented this..but the requirement i got is to use bind variable instead of literal..but what im getting is number format exception
    Is there exist a way to set bind variable instead of literal

    ReplyDelete

Provide your thoughts !