Sonntag, 27. März 2011

Building LOVs with popup search form

This post is about using LOVs within an ADF application. Although there are similar posts in other blogs, we need this post to build a basic application we will extend in a further blog post.

Our sample bases upon Oracle's hr schema. It contains one Entity Object "EmployeesEO", a corresponding View Object "EmployeesVO" and a read-only View Object "LOVJobsVO" (SELECT * FROM jobs). We want to use LOVJobsVO as our LOV source within EmployeesVO.     


Configure Business Components dependent LOV
First, we configure our EmployeesVO to use LOVJobsVO as source of our LOV. The requirement is to show JobTitle as the LOV's display value, whereas JobId is returned as referenced key value. Andrejus Baranovskis describes this approach in his famous blog, so we just focus on the main steps that are necessary for our sample:

Edit EmployeesVO and add a new transient attribute JobsLOV



Select new transient attribute and add new LOV by clicking the green plus in section List of Values


Create a new View Accessor to make our LOVJobsVO accessible to EmployeesVO



Define JobTitle and JobId as values that are returned from LOV to EmployeesVO after selecting a value from the LOV


Select Tab UI Hints and configure it as follows


Create a ne jspx-page and drag & drop the data control as a form into the page




When running the page and clicking the magnifier symbol next to JobsLOV's input field we get the following popup Search Form

Mission accomplished! 

Please notice: Our next LOV-Post will base upon this sample application!
Download: Popup search region LOV with all queryable attributes sample application

Keine Kommentare :

Kommentar veröffentlichen