Friday Jul 22, 2011

Simple Hierarchy Viewer Search with ADF BC

This is actually based on a severe case of RTFM - by me. I got a request to help someone with implementing a search functionality inside the Hierarchy Viewer component. For some reason I assumed that this will need to be done in a programmatic way using the new dvt:search and dvt:searchresults dub-tags of the dvt:hv. Well after playing around for some hours I got to a point where I actually opened the documentation, and then I had my RTFM moment when I found <a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/graphs_charts.htm#ADFFD22229">this</a>.

Turns out that when you are using ADF BC as the base for your Hierarchy Viewer there is a simple way to hook up the search functionality in a declarative way.

Basically you set your HV to be based on a ViewObject that has a parameter. Then you add another VO that gives you the list of values and allows you to search by any attribute your want (name in the sample below). Then the second Vo basically populates the parameter of the first VO - all without coding.

Something like this:

P.S. - if you need a basic introduction to working with the hierarchy viewer see this past entry.

About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today