# Online Help for the ADF UIX List Of Values Sample Application

### What does this sample show?

The goal of this sample application is to demonstrate how to create a simple ADF application with an attached List Of Value (LOV) window that is used to populate an input field with Department numbers in the ADF UIX application.

## Why is this important?

This example shows how you in a declarative and easy way can build one of the most common Web application components there are - an LOV Window that is data bound and includes filtering options. A seemingly small task that in other technolgies and IDEs requires a massive amount of work to achieve.

## How was this sample built?

This sample was built using ADF technologies including Struts, which is the controller portion, ADF Business Components which is the middle-tier .Business Services, and ADF UIX which is the View portion of this application...

### What are the interesting parts that I should look at?

In this sample the interesting components to look closer at are the messageLovInput - Department Id - field located in the index.uix file. This is the starting point for the user, and as you can see the destination attribute for the messageLovInput field is set to the lovWindow1.uix file.

### listOfValues component

The lovWindow1.uix file is our LOV window. This file contains a listOfValues componet as the main component for this page. If you look at the properties for this component these are the interesting properties for this sample:

searchAreaMode

In order to use a dropdown list to select which column to use for the filtering of the LOV table the searchAreaMode has to be set to - filter

searchText

This is the actual listOfValue field - searchText - with which value we are going to use to filter/search the LOV table. In our case we are adding an EL expression to bind the SearchText field with the value that is being passed on the request, so that after we have refreshed and filtered the table we "keep" the value that was entered in the SearchText field.

In the listOfValues component we have a choice component that is displaying the different alternatives to filter the table. You can filter on Department Id and on Department Name. If you take a closer look at the choice component the only thing set in the Property Inspector is the name - filterBy. This name will be used by the ADF UIX event handlers to sort out what to filter on.

If you look in the Structure Window you can see that the choice component has two option components - Department # and Department Name. Each of these options has two properties set - text and value. The text property contains the text displayed in the list and value is used by the event handler to query the right column, thus the value should be set to the database column you want to query.

### Event Handlers

Another important part is the ADF UIX event handlers that can be located at the bottome of the Structure Window. It is here you wire your listOfValues component to the underlying business logic.

The event handler of interest is the lovFilter event handler. When the lovFilter event is raised the event handler executes two methods on the DepartmentsView ViewObject using the invoke element. The two methods that are being executed are setWhereClause and executeQuery.