ADF Code Corner How-to enforce LOV Query Filtering. Abstract: twitter.com/adfcodecorner

Similar documents
ADF Code Corner How-to further filter detail queries based on a condition in the parent view using ADF BC. Abstract: twitter.

ADF Code Corner How-to declaratively build a master-detail behavior with DVT components. Abstract: twitter.com/adfcodecorner

ADF Code Corner. 70. How-to build dependent list boxes with Web Services Business Services. Abstract: twitter.com/adfcodecorner

ADF Code Corner. 90. Filtering ADF bound lists. Abstract: twitter.com/adfcodecorner

ADF Code Corner How-to restrict the list of values retrieved by a model driven LOV. Abstract: twitter.com/adfcodecorner

ADF Code Corner How-to use the af:autosuggestbehavior component tag with ADF bound data sources. Abstract: twitter.

ADF Code Corner. 016-How-to customize the ADF Faces Table Filter. Abstract: twitter.com/adfcodecorner

ADF Mobile Code Corner

ADF Code Corner How-to build a reusable toolbar with Oracle ADF Declarative Components. Abstract: twitter.com/adfcodecorner

ADF Code Corner. 64. How-to implement a Select Many Shuttle with pre- selected values. Abstract: twitter.com/adfcodecorner

ADF Code Corner How-to bind custom declarative components to ADF. Abstract: twitter.com/adfcodecorner

ADF Code Corner. 048-How-to build XML Menu Model based site menus and how to protect them with ADF Security and JAAS. Abstract:

ADF Code Corner How-to show a glasspane and splash screen for long running queries. Abstract: twitter.com/adfcodecorner

ADF Mobile Code Corner

ADF Code Corner. 65. Active Data Service Sample Twitter Client. Abstract: twitter.com/adfcodecorner

ADF Code Corner How to cancel an edit form, undoing changes with ADFm savepoints

ADF Code Corner How-to launch a popup upon rendering of a page fragment in a region using JSF 2. Abstract: twitter.

ADF Mobile Code Corner

ADF Code Corner. 97. How-to defer train-stop navigation for custom form validation or other developer interaction. Abstract: twitter.

ADF Mobile Code Corner

ADF Code Corner Implementing auto suggest functionality in ADF Faces. Abstract:

ADF Code Corner. 71. How-to integrate Java Applets with Oracle ADF Faces. Abstract: twitter.com/adfcodecorner

ADF Code Corner. Oracle JDeveloper OTN Harvest 02 / Abstract: twitter.com/adfcodecorner

ADF Hands-On. Understanding Task Flow Activities / 2011 ADF Internal Enterprise 2.0 Training. Abstract:

ADF Code Corner. Oracle JDeveloper OTN Harvest 01 / Abstract: twitter.com/adfcodecorner

ADF Code Corner How-to use Captcha with ADF Faces and Oracle ADF. Abstract: twitter.com/adfcodecorner

Building Rich Enterprise JSF Applications with Oracle JHeadstart for ADF (11.1.1)

Oracle ADF 11g: New Declarative Validation, List of Values, and Search Features. Steve Muench Consulting Product Manager Oracle ADF Development Team

Oracle Retail Accelerators for WebLogic Server 11g

ORACLE JHEADSTART 12C for ADF

Developing an ADF 11g client for Agile PLM. Developing an ADF 11g client for Agile PLM

Getting Started with Access

Building J2EE Applications with Oracle JHeadstart for ADF

Training Guide. Microsoft Excel 2010 Advanced 1 Using Conditional and Custom Formats. Applying Conditional Formatting

Getting Started With the Cisco PAM Desktop Software

Access Review. 4. Save the table by clicking the Save icon in the Quick Access Toolbar or by pulling

Oracle Fusion Middleware 11g: Build Applications with ADF Accel

Student Manual. Cognos Analytics

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Student Manual. Cognos Analytics

Rich Web UI made simple Building Data Dashboards without Code

ADF Code Corner. Oracle JDeveloper OTN Harvest 09 / Abstract: twitter.com/adfcodecorner

Go to /Jdevbin/jdev/bin Double click on Jdevw.exe

Oracle Developer Day

ADF Code Corner. Oracle JDeveloper OTN Harvest 12 / Abstract: twitter.com/adfcodecorner

Oracle Fusion Middleware

ADF Code Corner. Oracle JDeveloper OTN Harvest 10 / Abstract: twitter.com/adfcodecorner

Real Application Security Administration

Oracle Application Development Framework Overview

ADF OAF Who Cares? You Do! Oracle Applications Framework / Application Development Framework - Which way do I go?

ADF Region Interaction: External Train Navigation

Oracle WebCenter Suite Integrating Secure Enterprise Search

Word 2010 Getting Started with Word. Introduction. Getting to know Word The Ribbon. Video: Exploring Your Word 2010 Environment

Join Queries in Cognos Analytics Reporting

Cisco Unified CM User Options

Oracle BPEL Process Manager Demonstration

<Insert Picture Here> The Oracle Fusion Development Platform: Oracle JDeveloper and Oracle ADF Overview

Oracle Fusion Middleware

<Insert Picture Here> Accelerated Java EE Development: The Oracle Way

Application Extender 16.3 Web Access

Microsoft Power BI Tutorial: Importing and analyzing data from a Web Page using Power BI Desktop

Take Your Oracle Forms on the Road Using ADF Mobile. Mia Urman, OraPlayer & Denis Tyrell, Oracle Corporation

Oracle. SCM Cloud Configurator Modeling Guide. Release 13 (update 17D)

Oracle Database. Installation and Configuration of Real Application Security Administration (RASADM) Prerequisites

OnBase Unity Client Navigation & Personalization

Oracle JDeveloper/Oracle ADF 11g Production Project Experience

Customizing Oracle Identity Governance: Populating Request Attributes

Extensibility Guide Oracle Financial Services Lending and Leasing Release [October] [2013] Part No. E

Concordance Basics. Part I

BlueMix Hands-On Workshop

Switchboard. Creating and Running a Navigation Form

Introduction. Getting to Know Word The Ribbon. Word 2010 Getting Started with Word. Video: Exploring Your Word 2010 Environment.

Tutorial 1: Simple Parameterized Mapping

BUILD YOUR OWN SAP FIORI APP IN THE CLOUD Exercise Week 5

Getting started with ADF 11g

Frequency tables Create a new Frequency Table

Overview. Principal Product Manager Oracle JDeveloper & Oracle ADF

Oracle Fusion Middleware

<Insert Picture Here> The Latest E-Business Suite R12.x OA Framework Rich User Interface Enhancements

Oracle ADF: The technology behind project fusion. Lynn Munsinger Principal Product Manager Application Development Tools Oracle Corporation

Procedure to Create Custom Report to Report on F5 Virtual Services

Creating a Dashboard Prompt

To begin, select Styles and Formatting under Format in the Menu bar. To the right of your screen this window will appear (below).

OIG 11G R2 Field Enablement Training

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Contents. Common Site Operations. Home actions. Using SharePoint

Mobile Application Development: Introducing ADF Mobile Native Client Framework

Queries with Multiple Criteria (OR)

SPARK. User Manual Ver ITLAQ Technologies

If you wish to make an improved product, you must already be engaged in making an inferior one.

Working with Macros. Creating a Macro

No Programming Required Create web apps rapidly with Web AppBuilder for ArcGIS

Oracle Fusion Middleware

Colleague UI4.3 Documentation

CREATING JUMP SEARCHES WITH THE XACTSITE WEB SITES

Cognos Analytics Reporting User Interface

CNS Barcode. Version 1.3. Integrating with FileMaker Go

PEERNET PDF Creator Plus 6.0 Thank you for choosing PDF Creator Plus! Getting Started QUICK START GUIDE

Persistence Designer User s Guide. Version 3.4

CIS 764 Tutorial. By Vamsee Raja Jarugula.

Transcription:

ADF Code Corner 107. How-to enforce LOV Query Filtering Abstract: A question on OTN was about how-to restrict queries in a LOV dialog to avoid unfiltered and expensive queries. For this at least one of the LOV query fields must be provided with a value. This article explains how the above requirement can be implemented declaratively with the help of a view criteria. twitter.com/adfcodecorner Author: Frank Nimphius, Oracle Corporation twitter.com/fnimphiu 20-MAR-2013

Oracle ADF Code Corner is a loose blog-style series of how-to documents that provide solutions to real world coding problems. Disclaimer: All samples are provided as is with no guarantee for future upgrades or error correction. No support can be given through Oracle customer support. Please post questions or report problems related to the samples in this series on the OTN forum for Oracle JDeveloper: http://forums.oracle.com/forums/forum.jspa?forumid=83 Introduction The images below show a LOV dialog that requires users to at least specify search conditions for at least a single required search field. At runtime, using a LOV input text component, users click the LOV icon to launch the list dialog The LOV dialog opens with a search field that indicates search fields as selectively required (see image below). That is that at least one of these fields must be provided with a seach condition. Note: You can use the same declarative approach explained in this article to also allow optional search fields, e.g. only flagging two attributes as selectively requied. 2

Pressing the Search button without providing any search criteria will cause an error to be displayed as shown in the image below. Correcting the problem and adding a search condition for at least one search field does correct the problem (see image below) 3

If one of the selective search fields has a value provided, the search will produce a result. Let's see how to implement this solution declarative with no coding required. Creating a View Criteria The recipe for solving this problem is in that List-of-values can be restricted in their query by view criteria and that view criteria can define their query attributes as selectively required. The sample application uses a LOV based on the ADF Business Components DepartmentsView object shown in the image below. 4

To create the View Criteria, open the DepartmentsView object (or the view object that holds your list of values) and select the Query option as shown in the image above. In the ViewCriteria section, click the green plus icon to launch the View Criteria creation dialog. Name the view criteria, like LovDepartmentsViewCriteria in the above image, and then, with the Group node selected, press the Add Item button until all of the attributes you want to be displayed in the LOV query regions are added. Note that associations may also shows, in which case you use the Delete button unless you want to filter the LOV by dependent view objects too. Next (shown in the image below) you create a bind variable for each of the attributes in the view criteria. For this, select the view criteria and choose the Operand list to show Bind Variable. Then press the 5

green plus icon (as shown in the image below) to create new bind variables to hold the query values at runtime. Note: Make sure you create a Bind variable for each attribute Define a unique name for the bind variables and make sure the Type field matches the type of the attribute. Next, select each attribute in the view criteria and change the Validation option to Selective Required for all attributes that should have a value unless one of the other selectively required attributes got one assigned. In the sample I set this for all attributes. In your implementation you can only have a few (at least two must be marked as selectively required though) 6

Press Ok to close the dialog with the view criteria created. Building the Model Driven LOV Next you need to build the list-of-values for the attribute that should provide the option. In the image below, this attribute is the DepartmentId. As shown in the image above, press the green plus icon next to the List of Values <attribute name> header to bring up the List of Values creation dialog. 7

In the LOV creation dialog, press the green plus icon (shown in the image above) and select the DepartmentsView object (your list view object in your implementation). Move the view object to the list of View Accessors as shown in the image below, select it and press the Edit button to apply the view criteria created earlier. Select the view criteria and shuttle it to the Selected list. You don't need to provide values for the bind variables as this is what the LOB search form will add. 8

Press Ok to close this dialog. Once you configured the attributes as shown in the image below, press the UI Hints tab. In the UI Hints tab pane, select all attributes that should be displayed in the list-of-values result table (in the image below, I selected all attributes to show) 9

Set the Default List Type to Input Text with List of Values and choose the name of the view criteria LovDepartmentsViewCriteria in the sample for the Include Search Region field. Press Ok to close the dialog. This basically is all you needed to do for implementing the use case. To build the user interface, just drag and drop the EmployeesView object (the view object that contains the LOV attribute) to the page and drop it as an ADF Form as shown in the image below. 10

Press Ok to create the form and run the page. At runtime you should the UI shown below and the behavior shown in the images at the start of this article. Download You can download a JDeveloper 11.1.1.6 sample workspace as sample 107 from the ADF Code Corner website: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html You need to configure the database connection to point to a local database with the Oracle HR schema unlocked. Then run the JSPX file. RELATED DOCOMENTATION 11