An Oracle JDeveloper How To Document
Written by Jonas Jacobi
This HowTo demonstrates how to build an ADF UIX application that contains an LOV with Oracle JDeveloper 10g. This Howto will show you how easy it is to create an LOV, and how you can apply a filter to your LOV in Oracle JDeveloper 10g. For more information and HowTos, please, refer to the JDeveloper HowTo documents on Oracle Technology Network (OTN). For this simple application we are using ADF UIX, Struts, and ADF Business Components.
This session covers the following tasks:
In order to follow this HowTo and build this LOV application you need the Oracle JDeveloper 10g production release, and an Oracle database with the sample HR schema installed.
Before we go on the path to create our views and pageflow we need some where to store our work in progress.
This is the first solution to pass string value from one page to another, and in this case the Java bean (and value) will exist during the entire session, whereas the second solution, which is covered later in this howto, the value only exist during the request.
This section is just going to cover how to generate a Java bean and make some small changes to it needed for this howto.
The first step in our application is to create a Struts pageflow
In the DataControl Palette you should see a list of all available data controls in your Application Workspace. In our case we can see one data control mapping to our Business Components - AppModule - in our Model project.
Note: If the Data Control Palette is not visible you can open the palette from the JDeveloper View menu.
We now have a page called main.uix, and we would like to add a LOV to this page for the Departments filed. This field will be used to enter and change the department for a particular employee. The LOV should display the ID and Name of the department to make it easier the select the right department.
This chapter will focus on wiring up the MessageLovInput field we just added to our page to a LovWindow page, so that the end user can search for departments in a separate window.
When you used the Data Control palette to create your new MessageLovInput field the design time created a new UIX page - lovWindow0.uix - that is pre-wired to your MessageLovInput fieled. The only thing you have to do is to add the data source for the LOV window.
As you noticed the Lov Window contains a Search field. This Search field is not wired up by default and in this session we will add some components in order to make this work.
First we need to add a drop down list, so that the user can decide what search criteria to use.
In the listOfValues components there are several named children (slots) that can be used, and one of them is particularly designed to hold a dropdown list - filterChoice. In the ADF UIX land we call dropdown lists "choice" components.
Modifying the lovFilter event handler
Now we need to modify the event handler to make the filtering option to work: The event handlers are located at the bottom of the Structure Window.