adfdevguide

Embed Size (px)

DESCRIPTION

Orcle Application development guide

Citation preview

  • Oracle Application Development FrameworkDevelopers Guide

    10g Release 3 (10.1.3)

    B25386-01

    January 2006This book describes how to develop enterprise applications with Oracle ADF.

  • Oracle Application Development Framework Developers Guide, 10g Release 3 (10.1.3)

    B25386-01

    Copyright 1997, 2006, Oracle. All rights reserved.

    Primary Author: Ken Chu, Orlando Cordero, Ralph Gordon, Rosslynne Hefferan, Mario Korf, Robin Merrin, Steven Muench, Kathryn Munn, Barbara Ramsey, Jon Russell, Deborah Steiner, Odile Sullivan-Tarazi, Poh Lee Tan, Robin Whitmore, Martin Wykes

    The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited.

    The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose.

    If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable:

    U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer SoftwareRestricted Rights (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065

    The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs.

    Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

    The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party.

  • iii

    Contents

    Preface ............................................................................................................................................................... xixAudience..................................................................................................................................................... xixDocumentation Accessibility ................................................................................................................... xixRelated Documents ................................................................................................................................... xxConventions ............................................................................................................................................... xx

    Part I Getting Started with Oracle ADF Applications

    1 Introduction to Oracle ADF Applications 1.1 Overview of Oracle Application Development Framework ................................................ 1-11.1.1 Framework Architecture and Supported Technologies................................................. 1-11.1.1.1 View Layer Technologies Supported......................................................................... 1-21.1.1.2 Controller Layer Technologies Supported................................................................ 1-21.1.1.3 Business Services Technologies Supported by ADF Model................................... 1-21.1.1.4 Recommended Technologies for J2EE Enterprise Developers .............................. 1-31.1.2 Declarative Development with Oracle ADF and JavaServer Faces.............................. 1-31.1.2.1 Declarative J2EE Technologies You May Have Already Used.............................. 1-41.1.2.2 JSF Offers Dependency Injection, Page Handling, EL and More .......................... 1-41.1.2.3 Oracle ADF Further Raises the Level of Declarative Development for JSF......... 1-61.1.3 Key ADF Binding Features for JSF Development........................................................... 1-81.1.3.1 Comprehensive JDeveloper Design-Time Support ................................................. 1-81.1.3.2 More Sophisticated UI Functionality Without Coding........................................... 1-91.1.3.3 Centralize Common Functionality in Layered Model Metadata ....................... 1-101.1.3.4 Simplified Control Over Page Lifecycle ................................................................. 1-101.2 Development Process with Oracle ADF and JavaServer Faces......................................... 1-111.2.1 Overview of the Steps for Building an Application .................................................... 1-111.2.1.1 Starting by Creating a New Application................................................................ 1-111.2.1.2 Building the Business Service in the Model Project ............................................. 1-121.2.1.3 Creating a Data Control for Your Service to Enable Data Binding .................... 1-131.2.1.4 Dragging and Dropping Data to Create a New JSF Page.................................... 1-141.2.1.5 Examining the Binding Metadata Files Involved ................................................. 1-161.2.1.6 Understanding How Components Reference Bindings via EL .......................... 1-171.2.1.7 Configuring Binding Properties If Needed ........................................................... 1-181.2.1.8 Understanding How Bindings Are Created at Runtime ..................................... 1-18

  • iv

    1.2.2 Making the Display More Data-Driven......................................................................... 1-191.2.2.1 Hiding and Showing Groups of Components Based on Binding Properties ... 1-201.2.2.2 Toggling Between Alternative Sets of Components Based on Binding

    Properties .................................................................................................................... 1-21

    2 Oracle ADF Service Request Demo Overview2.1 Introduction to the Oracle ADF Service Request Demo ....................................................... 2-12.1.1 Requirements for Oracle ADF Service Request Application......................................... 2-22.1.2 Overview of the Schema ..................................................................................................... 2-22.2 Setting Up the Oracle ADF Service Request Demo ............................................................... 2-32.2.1 Downloading and Installing the Oracle ADF Service Request Application............... 2-32.2.2 Installing the Oracle ADF Service Request Schema ....................................................... 2-52.2.3 Creating the Oracle JDeveloper Database Connection .................................................. 2-62.2.4 Running the Oracle ADF Service Request Demo in JDeveloper .................................. 2-72.2.5 Running the Oracle ADF Service Request Demo Unit Tests in JDeveloper ............... 2-92.3 Quick Tour of the Oracle ADF Service Request Demo ...................................................... 2-102.3.1 Customer Logs In and Reviews Existing Service Requests ........................................ 2-112.3.2 Customer Creates a Service Request.............................................................................. 2-132.3.3 Manager Logs In and Assigns a Service Request......................................................... 2-162.3.4 Manager Views Reports and Updates Technician Skills ............................................ 2-182.3.5 Technician Logs In and Updates a Service Request .................................................... 2-21

    3 Building and Using Application Services3.1 Introduction to Business Services............................................................................................. 3-13.2 Implementing Services with EJB Session Beans ..................................................................... 3-23.2.1 How to Create a Session Bean............................................................................................ 3-23.2.1.1 Remote and Local Interfaces ....................................................................................... 3-23.2.1.2 Generating Session Facade Methods ......................................................................... 3-33.2.2 What Happens When You Create a Session Bean .......................................................... 3-33.2.3 What You May Need to Know When Creating a Session Bean.................................... 3-73.2.4 How to Update an Existing Session Bean With New Entities....................................... 3-83.3 Creating Classes to Map to Database Tables .......................................................................... 3-83.3.1 How to Create Classes ........................................................................................................ 3-93.3.2 What Happens when you Create a Class......................................................................... 3-93.3.3 What You May Need to Know........................................................................................ 3-103.3.3.1 Associating Descriptors with Different Database Tables .................................... 3-103.3.3.2 Using Amendment Methods ................................................................................... 3-113.3.3.3 Modifying the Generated Code............................................................................... 3-113.4 Mapping Classes to Tables ..................................................................................................... 3-123.4.1 Types of Mappings ........................................................................................................... 3-123.4.2 Direct Mappings ............................................................................................................... 3-123.4.3 How to Create Direct Mappings..................................................................................... 3-133.4.4 What Happens when you Create a Direct Mapping ................................................... 3-133.4.5 What You May Need to Know........................................................................................ 3-14

  • v3.5 Mapping Related Classes with Relationships...................................................................... 3-143.5.1 How to Create Relationship Mappings ......................................................................... 3-153.5.2 What Happens when you Create a Relationship ......................................................... 3-153.5.3 What You May Need to Know........................................................................................ 3-163.6 Finding Objects by Primary Key............................................................................................ 3-173.7 Querying Objects ..................................................................................................................... 3-173.7.1 How to Create a Query .................................................................................................... 3-183.7.2 What You May Need to Know........................................................................................ 3-183.7.2.1 Using a Query By Example ...................................................................................... 3-183.7.2.2 Sorting Query Results ............................................................................................... 3-183.8 Creating and Modifying Objects with a Unit of Work ....................................................... 3-193.8.1 How to Create a Unit of Work ........................................................................................ 3-193.8.1.1 Creating Objects with Unit of Work ....................................................................... 3-193.8.1.2 Typical Unit of Work Usage..................................................................................... 3-203.8.2 What Happens when you Modify a Unit of Work ...................................................... 3-223.8.2.1 Deleting Objects ......................................................................................................... 3-223.8.3 What You May Need to Know........................................................................................ 3-233.8.3.1 Unit of Work and Change Policy ............................................................................ 3-233.8.3.2 Nested and Parallel Units of Work ......................................................................... 3-233.9 Interacting with Stored Procedures....................................................................................... 3-243.9.1 Specifying an Input Parameter ....................................................................................... 3-243.9.2 Specifying an Output Parameter .................................................................................... 3-253.9.3 Specifying an Input / Output Parameter...................................................................... 3-263.9.4 Using an Output Parameter Event ................................................................................. 3-263.9.5 Using a StoredFunctionCall ............................................................................................ 3-263.9.6 Query Sequencing............................................................................................................. 3-273.10 Exposing Services with ADF Data Controls ........................................................................ 3-273.10.1 How to Create ADF Data Controls ................................................................................ 3-273.10.2 Understanding the Data Control Files........................................................................... 3-283.10.2.1 About the DataControls.dcx File............................................................................. 3-283.10.2.2 About the Structure Definition Files....................................................................... 3-283.10.2.3 About the Entity XML Files ..................................................................................... 3-283.10.2.4 About the Design-time XML Files........................................................................... 3-293.10.3 Understanding the Data Control Palette....................................................................... 3-293.10.3.1 Overview of the Data Control Business Objects ................................................... 3-303.10.3.2 Refreshing ADF Data Controls After Modifying Business Services ................. 3-31

    Part II Building the Web Interface

    4 Getting Started with ADF Faces 4.1 Introduction to ADF Faces......................................................................................................... 4-14.2 Setting Up a Workspace and Project ........................................................................................ 4-34.2.1 What Happens When You Use an Application Template to Create a Workspace .... 4-44.2.1.1 Starter web.xml File...................................................................................................... 4-54.2.1.2 Starter faces-config.xml File ........................................................................................ 4-74.2.2 What You May Need to Know About the ViewController Project .............................. 4-8

  • vi

    4.2.3 What You May Need to Know About Multiple JSF Configuration Files .................... 4-94.3 Creating a Web Page ............................................................................................................... 4-104.3.1 How to Add a JSF Page.................................................................................................... 4-104.3.2 What Happens When You Create a JSF Page ............................................................... 4-124.3.3 What You May Need to Know About Using the JSF Navigation Diagram ............. 4-134.3.4 What You May Need to Know About ADF Faces Dependencies and Libraries..... 4-144.4 Laying Out a Web Page........................................................................................................... 4-154.4.1 How to Add UI Components to a JSF Page .................................................................. 4-164.4.2 What Happens When You First Insert an ADF Faces Component ........................... 4-174.4.2.1 More About the web.xml File .................................................................................. 4-184.4.2.2 More About the faces-config.xml File..................................................................... 4-204.4.2.3 Starter adf-faces-config.xml File .............................................................................. 4-204.4.3 What You May Need to Know About Creating JSF Pages ......................................... 4-224.4.3.1 Editing in the Structure Window ............................................................................ 4-244.4.3.2 Displaying Errors....................................................................................................... 4-244.4.4 Using the PanelPage Component................................................................................... 4-254.4.4.1 PanelPage Facets........................................................................................................ 4-264.4.4.2 Page Body Contents .................................................................................................. 4-294.5 Creating and Using a Backing Bean for a Web Page .......................................................... 4-314.5.1 How to Create and Configure a Backing Bean............................................................. 4-314.5.2 What Happens When You Create and Configure a Backing Bean............................ 4-324.5.3 How to Use a Backing Bean in a JSF Page..................................................................... 4-334.5.4 How to Use the Automatic Component Binding Feature .......................................... 4-344.5.5 What Happens When You Use Automatic Component Binding in JDeveloper..... 4-344.5.6 What You May Need to Know About Backing Beans and Managed Beans............ 4-354.5.7 Using ADF Data Controls and Backing Beans ............................................................. 4-374.6 Best Practices for ADF Faces .................................................................................................. 4-38

    5 Displaying Data in a User Interface 5.1 Introduction to Displaying Data on a Page Using ADF........................................................ 5-15.2 Using the Data Control Palette to Create Databound UI Components .............................. 5-25.2.1 What You See on the Data Control Palette ...................................................................... 5-35.2.2 How to Create Databound UI Components Using the Data Control Palette ............. 5-55.2.3 What Happens When You Create a Component From the Data Control Palette ...... 5-75.2.4 What Happens at Runtime................................................................................................. 5-85.3 Working with the DataBindings.cpx File ............................................................................... 5-95.3.1 How to Create a DataBindings.cpx File ........................................................................... 5-95.3.2 What Happens When You Create a DataBinding.cpx File ......................................... 5-105.4 Configuring the ADF Binding Filter ..................................................................................... 5-115.4.1 How to Configure the ADF Binding Filter.................................................................... 5-115.4.1.1 Configuring the Servlet Context Parameter ......................................................... 5-115.4.1.2 Configuring ADF Binding Filter Class ................................................................... 5-125.4.1.3 Configuring the Filter Mapping .............................................................................. 5-12

  • vii

    5.5 Working with Page Definition Files ...................................................................................... 5-125.5.1 How to Create a Page Definition File ............................................................................ 5-135.5.2 What Happens When You Create a Page Definition File ........................................... 5-135.5.2.1 About the Bindings in the parameters Element .................................................... 5-155.5.2.2 About Bindings in the executables Element .......................................................... 5-165.5.2.3 About the Bindings in the bindings Element ........................................................ 5-185.5.3 What Happens at Runtime.............................................................................................. 5-195.5.4 What You May Need to Know About Binding Container Scope .............................. 5-195.6 Using ADF Databinding EL Expressions ............................................................................. 5-205.6.1 How to Create an ADF Databinding EL Expression ................................................... 5-205.6.1.1 Creating or Editing an ADF Databinding EL Expression ................................... 5-215.6.1.2 Using the Expression Builder .................................................................................. 5-215.6.2 What Happens When You Use ADF Databinding EL Expressions .......................... 5-265.6.2.1 EL Expressions That Reference Attribute Bindings ............................................. 5-265.6.2.2 EL Expressions That Reference Table Bindings .................................................... 5-265.6.2.3 EL Expressions That Reference Action Bindings.................................................. 5-275.6.3 Using Binding Object Runtime Properties.................................................................... 5-295.6.4 What You May Need to Know About Binding to Values in Other Pages................ 5-29

    6 Creating a Basic Page 6.1 Introduction to Creating a Basic Page...................................................................................... 6-16.2 Using Attributes to Create Text Fields..................................................................................... 6-26.2.1 How to Use the Data Control Palette to Create a Text Field ......................................... 6-26.2.2 What Happens When You Use the Data Control Palette to Create a Text Field........ 6-36.2.2.1 Creating and Using Iterator Bindings ...................................................................... 6-36.2.2.2 Creating and Using Value Bindings .......................................................................... 6-46.2.2.3 Using EL Expressions to Bind UI Components ...................................................... 6-56.2.2.4 The JSF and ADF Lifecycles ........................................................................................ 6-56.3 Creating a Basic Form................................................................................................................. 6-96.3.1 How to Use the Data Control Palette to Create a Form ................................................. 6-96.3.2 What Happens When You Use the Data Control Palette to Create a Form............. 6-116.3.2.1 Using Facets................................................................................................................ 6-126.4 Incorporating Range Navigation into Forms....................................................................... 6-136.4.1 How to Insert Navigation Controls into a Form .......................................................... 6-136.4.2 What Happens When Command Buttons Are Created Using the Data

    Control Palette................................................................................................................... 6-146.4.2.1 Using Action Bindings for Built-in Navigation Operations................................ 6-146.4.2.2 Iterator RangeSize Attribute .................................................................................... 6-156.4.2.3 Using EL Expressions to Bind to Navigation Operations ................................... 6-166.4.3 What Happens at Runtime: About Action Events and Action Listeners ................. 6-176.4.4 What You May Need to Know About the Browser Back Button............................... 6-176.5 Modifying the UI Components and Bindings on a Form .................................................. 6-186.5.1 How to Modify the UI Components and Bindings...................................................... 6-196.5.1.1 Changing the Value Binding for a UI Component ............................................... 6-206.5.1.2 Changing the Action Binding for a UI Component.............................................. 6-206.5.2 What Happens When You Modify Attributes and Bindings ..................................... 6-20

  • viii

    7 Adding Tables 7.1 Introduction to Adding Tables ................................................................................................. 7-17.2 Creating a Basic Table ................................................................................................................ 7-27.2.1 How to Create a Basic Table............................................................................................... 7-27.2.2 What Happens When You Use the Data Control Palette to Create a Table ............... 7-47.2.2.1 Iterator and Value Bindings for Tables ..................................................................... 7-47.2.2.2 Code on the JSF Page for an ADF Faces Table ......................................................... 7-57.3 Incorporating Range Navigation into Tables.......................................................................... 7-67.3.1 How to Use Navigation Controls in a Table.................................................................... 7-77.3.2 What Happens When You Use the SelectRangeChoiceBar Component..................... 7-77.3.3 What Happens at Runtime................................................................................................. 7-87.3.4 What You May Need to Know About the Browser Back Button.................................. 7-87.4 Modifying the Attributes Displayed in the Table .................................................................. 7-97.4.1 How to Modify the Displayed Attributes ....................................................................... 7-97.4.2 Changing the Binding for a Table .................................................................................. 7-117.4.3 What Happens When You Modify Bindings or Display of Attributes..................... 7-117.5 Adding Hidden Capabilities to a Table................................................................................ 7-117.5.1 How to Use the detailStamp Facet ................................................................................. 7-127.5.2 What Happens When You Use the detailStamp Facet ................................................ 7-137.5.3 What Happens at Runtime.............................................................................................. 7-137.6 Enable Row Selection in a Table ............................................................................................ 7-137.6.1 How to Use the tableSelectOne Component in the Selection Facet .......................... 7-157.6.2 What Happens When You Use the tableSelectOne Component ............................... 7-167.6.3 What Happens at Runtime.............................................................................................. 7-177.6.4 How to Use the tableSelectMany Component in the Selection Facet ....................... 7-177.6.5 What Happens When You Use the tableSelectMany Component ............................ 7-187.6.6 What Happens at Runtime.............................................................................................. 7-217.7 Setting the Current Object Using a Command Component .............................................. 7-217.7.1 How to Manually Set the Current Row......................................................................... 7-227.7.2 What Happens When You Set the Current Row.......................................................... 7-227.7.3 What Happens At Runtime............................................................................................. 7-23

    8 Working with Master-Detail Relationships 8.1 Introduction to Master-Detail Relationships in ADF ............................................................ 8-18.2 Using the Data Control Palette to Create Master-Detail Components ............................... 8-28.3 Using Tables and Forms to Display Master-Detail Relationships ....................................... 8-38.3.1 How to Display Master-Detail Related Data Using Tables and Forms ....................... 8-48.3.2 What Happens When You Create a Master-Detail Browse Page ................................. 8-58.3.2.1 Code Generated in the JSF Page ................................................................................. 8-68.3.2.2 Binding Objects Added to the Page Definition File................................................. 8-88.3.3 What Happens at Runtime.............................................................................................. 8-108.3.4 Displaying Master-Detail Data on Separate Browse Pages ........................................ 8-108.4 Using ADF Databound Trees to Display Master-Detail Relationships ........................... 8-118.4.1 How to Create a Databound Tree Using the Data Control Palette ........................... 8-128.4.2 What Happens When You Create an ADF Faces Databound Tree ........................... 8-148.4.2.1 Code Generated in the JSF Page .............................................................................. 8-148.4.2.2 Binding Objects Added to the Page Definition File.............................................. 8-15

  • ix

    8.4.3 What Happens at Runtime.............................................................................................. 8-168.5 Using Tree Tables to Display Master-Detail Relationships ............................................... 8-178.5.1 How to Create an ADF Faces Databound Tree Table ................................................. 8-178.5.2 What Happens When You Create an ADF Faces Databound Tree Table ................ 8-188.5.2.1 Code Generated in the JSF Page .............................................................................. 8-188.5.2.2 Binding Objects Added to the Page Definition File.............................................. 8-188.5.3 What Happens at Runtime.............................................................................................. 8-198.6 Displaying Detail Information Using an Inline Table ........................................................ 8-218.6.1 How to Display Detail Information Using an Inline Table ........................................ 8-218.6.2 What Happens When You Create an Inline Detail Table .......................................... 8-238.6.2.1 Code Generated in the JSF Page .............................................................................. 8-238.6.2.2 Binding Objects Added to the Page Definition File.............................................. 8-248.6.3 What Happens at Runtime ............................................................................................. 8-25

    9 Adding Page Navigation Using Outcomes9.1 Introduction to Page Navigation Using Outcomes................................................................ 9-19.2 Creating Navigation Rules ........................................................................................................ 9-29.2.1 How to Create Page Navigation Rules ............................................................................. 9-29.2.1.1 About Navigation Rule Elements .............................................................................. 9-29.2.1.2 Using the Navigation Modeler to Define Navigation Rules .................................. 9-39.2.1.3 Using the JSF Configuration Editor ........................................................................... 9-59.2.2 What Happens When You Create a Navigation Rule .................................................... 9-89.2.3 What Happens at Runtime.............................................................................................. 9-109.2.4 What You May Need to Know About Navigation Rules and Cases......................... 9-119.2.4.1 Defining Rules in Multiple Configuration Files.................................................... 9-119.2.4.2 Overlapping Rules..................................................................................................... 9-129.2.4.3 Conflicting Navigation Rules .................................................................................. 9-129.2.4.4 Splitting Navigation Cases Over Multiple Rules.................................................. 9-139.2.5 What You May Need to Know About the Navigation Modeler................................ 9-139.3 Creating Simple Navigation Using Static Outcome Values .............................................. 9-149.3.1 How to Create Simple Navigation Components Using Static Outcomes ................ 9-149.3.2 What Happens When You Create a Simple Navigation with Static Outcomes ...... 9-159.4 Creating Navigation Using Dynamic Outcome Values ..................................................... 9-169.4.1 How to Create Navigation Components Using Dynamic Outcomes ....................... 9-179.4.2 What Happens When You Use Dynamic Outcome Values........................................ 9-189.4.3 What Happens at Runtime.............................................................................................. 9-209.4.4 What You May Need to Know About Using Default Cases ...................................... 9-209.4.5 What You May Need to Know About Action Listener Methods .............................. 9-21

    10 Creating More Complex Pages 10.1 Introduction to More Complex Pages................................................................................... 10-110.2 Using a Managed Bean to Store Information....................................................................... 10-210.2.1 How to Use a Managed Bean to Store Information ..................................................... 10-210.2.2 What Happens When You Create a Managed Bean.................................................... 10-4

  • x10.3 Creating Command Components to Execute Methods ..................................................... 10-410.3.1 How to Create a Command Component Bound to a Service Method...................... 10-510.3.2 What Happens When You Create Command Components Using a Method ......... 10-710.3.2.1 Using Parameters in a Method ................................................................................ 10-710.3.2.2 Using EL Expressions to Bind to Methods ............................................................ 10-710.3.3 What Happens at Runtime.............................................................................................. 10-810.4 Passing Parameter Values to Another Page Using a Command Component ................ 10-810.4.1 How to Pass Parameters Using Command Components ........................................... 10-910.4.2 What Happens When You Set Parameters ................................................................... 10-910.4.3 What Happens at Runtime............................................................................................ 10-1010.5 Overriding Declarative Methods......................................................................................... 10-1010.5.1 How to Override a Declarative Method...................................................................... 10-1110.5.2 What Happens When You Override a Declarative Method..................................... 10-1410.6 Creating a Form or Table Using a Method that Takes Parameters ................................ 10-1510.6.1 How to Create a Form or Table Using a Method That Takes Parameters.............. 10-1510.6.2 What Happens When You Create a Form Using a Method that Takes

    Parameters 10-1610.6.3 What Happens at Runtime............................................................................................ 10-1710.7 Creating an Input Form for a New Record ........................................................................ 10-1710.7.1 How to Use Constructors to Create an Input Form................................................... 10-1710.7.2 What Happens When You Use a Constructor............................................................ 10-1910.7.3 How to Use a Custom Method to Create an Input Form.......................................... 10-2110.7.4 What Happens When You Use Methods to Create a Parameter Form................... 10-2110.7.4.1 Using Variables and Parameters ........................................................................... 10-2110.7.5 What Happens at Runtime............................................................................................ 10-2310.8 Creating Search Pages ........................................................................................................... 10-2310.8.1 How to Create a Search Form ....................................................................................... 10-2410.8.2 What Happens When You Use Parameter Methods ................................................. 10-2410.8.3 What Happens at Runtime............................................................................................ 10-2710.9 Conditionally Displaying the Results Table on a Search Page........................................ 10-2810.9.1 How to Add Conditional Display Capabilities .......................................................... 10-2910.9.2 What Happens When you Conditionally Display the Results Table...................... 10-29

    11 Using Complex UI Components11.1 Introduction to Complex UI Components ........................................................................... 11-111.2 Using Dynamic Menus for Navigation................................................................................. 11-211.2.1 How to Create Dynamic Navigation Menus ................................................................ 11-311.2.1.1 Creating a Menu Model............................................................................................ 11-311.2.1.2 Creating the JSF Page for Each Menu Item.......................................................... 11-1511.2.1.3 Creating the JSF Navigation Rules........................................................................ 11-1811.2.2 What Happens at Runtime............................................................................................ 11-1911.2.3 What You May Need to Know About Menus ............................................................ 11-2011.3 Using Popup Dialogs............................................................................................................. 11-2111.3.1 How to Create Popup Dialogs ...................................................................................... 11-2311.3.1.1 Defining a JSF Navigation Rule for Launching a Dialog................................... 11-2411.3.1.2 Creating the JSF Page That Launches a Dialog .................................................. 11-2511.3.1.3 Creating the Dialog Page and Returning a Dialog Value.................................. 11-26

  • xi

    11.3.1.4 Handling the Return Value .................................................................................... 11-2911.3.1.5 Passing a Value into a Dialog ................................................................................ 11-3011.3.2 How the SRDemo Popup Dialogs Are Created ......................................................... 11-3211.3.3 What You May Need to Know About ADF Faces Dialogs....................................... 11-3611.3.4 Other Information........................................................................................................... 11-3611.4 Enabling Partial Page Rendering......................................................................................... 11-3711.4.1 How to Enable PPR ........................................................................................................ 11-3811.4.2 What Happens at Runtime............................................................................................ 11-3911.4.3 What You May Need to Know About PPR and Screen Readers ............................. 11-3911.5 Creating a Multipage Process .............................................................................................. 11-4011.5.1 How to Create a Process Train...................................................................................... 11-4111.5.1.1 Creating a Process Train Model ............................................................................ 11-4211.5.1.2 Creating the JSF Page for Each Train Node......................................................... 11-4611.5.1.3 Creating the JSF Navigation Rules........................................................................ 11-4811.5.2 What Happens at Runtime............................................................................................ 11-4911.5.3 What You May Need to Know About Process Trains and Menus.......................... 11-5011.6 Providing File Upload Capability ....................................................................................... 11-5111.6.1 How to Support File Uploading on a Page ................................................................. 11-5211.6.2 What Happens at Runtime............................................................................................ 11-5611.6.3 What You May Need to Know About ADF Faces File Upload ............................... 11-5611.6.4 Configuring File Uploading Initialization Parameters ............................................. 11-5711.6.5 Configuring a Custom Uploaded File Processor ....................................................... 11-5811.7 Creating Databound Dropdown Lists ................................................................................ 11-5811.7.1 How to Create a Dropdown List with a Fixed List of Values .................................. 11-5811.7.2 What Happens When You Create a Dropdown List Bound to a Fixed List .......... 11-6111.7.3 How to Create a Dropdown List with a Dynamic List of Values............................ 11-6211.7.4 What Happens When You Create a Dropdown List Bound to a Dynamic List .... 11-6311.7.5 How to Use Variables with Dropdown Lists.............................................................. 11-6411.8 Creating a Databound Shuttle.............................................................................................. 11-6511.8.1 How to Create a Databound Shuttle............................................................................ 11-6611.8.2 What Happens at Runtime............................................................................................ 11-73

    12 Using Validation and Conversion 12.1 Introduction to Validation and Conversion......................................................................... 12-112.2 Validation, Conversion, and the Application Lifecycle ..................................................... 12-212.3 Adding Validation ................................................................................................................... 12-312.3.1 How to Add Validation .................................................................................................. 12-312.3.1.1 Adding ADF Faces Validation................................................................................. 12-312.3.1.2 Adding ADF Model Layer Validation ................................................................... 12-712.3.2 What Happens When You Add Validation .................................................................. 12-712.3.3 What Happens at Runtime.............................................................................................. 12-912.3.4 What You May Need to Know...................................................................................... 12-1012.4 Creating Custom Validation................................................................................................. 12-1012.4.1 How to Create a Custom Validation Method............................................................. 12-1112.4.2 What Happens When You Create a Validation Method........................................... 12-1112.4.3 How to Create a Custom Validator.............................................................................. 12-1212.4.4 What Happens When You Use a Custom Validator ................................................. 12-15

  • xii

    12.5 Adding Conversion ............................................................................................................... 12-1512.5.1 How to Use Converters.................................................................................................. 12-1612.5.2 What Happens When You Add Conversion .............................................................. 12-1712.5.3 What Happens at Runtime............................................................................................ 12-1712.6 Creating Custom Converters................................................................................................ 12-1812.6.1 How to Create a Custom Converter............................................................................. 12-1812.6.2 What Happens When You Use a Custom Converter ................................................ 12-2012.7 Displaying Error Messages................................................................................................... 12-2012.7.1 How to Display Server-Side Error Messages on a Page............................................ 12-2112.7.2 What Happens When You Choose to Display Error Messages .............................. 12-2212.8 Handling and Displaying Exceptions in an ADF Application........................................ 12-2212.8.1 How to Change Error Handling................................................................................... 12-2212.8.2 What Happens When You Change the Default Error Handling ............................. 12-29

    13 Adding ADF Binding to Existing Web Pages13.1 Introduction to Adding ADF Bindings to Existing Web Pages ....................................... 13-113.1.1 How to Add ADF Bindings to Components Using the Data Control Palette ......... 13-213.1.2 What Happens When You Use the Data Control Palette to Add ADF Bindings.... 13-413.2 Designing Web Pages for ADF Bindings.............................................................................. 13-413.2.1 Creating the Page.............................................................................................................. 13-413.2.2 Adding Components to the Page ................................................................................... 13-513.2.3 Other Design Considerations.......................................................................................... 13-613.2.3.1 Creating Text Fields in Forms.................................................................................. 13-613.2.3.2 Creating Tables .......................................................................................................... 13-613.2.3.3 Creating Buttons and Links ..................................................................................... 13-613.2.3.4 Creating Lists ............................................................................................................. 13-613.2.3.5 Creating Trees or Tree Tables .................................................................................. 13-713.3 Adding ADF Bindings to Text Fields in a Form.................................................................. 13-713.3.1 How to Add ADF Bindings to Text Fields in a Form.................................................. 13-713.3.2 What Happens When You Add ADF Bindings to a Text Field ................................. 13-713.4 Adding ADF Bindings to Tables............................................................................................ 13-813.4.1 How to Add ADF Bindings to Tables ........................................................................... 13-813.4.2 What Happens When You Add ADF Bindings to a Table ....................................... 13-1013.5 Adding ADF Bindings to Actions ....................................................................................... 13-1213.5.1 How to Add ADF Bindings to Actions ....................................................................... 13-1213.5.2 What Happens When You Add ADF Bindings to an Action................................... 13-1313.6 Adding ADF Bindings to Selection Lists ............................................................................ 13-1313.6.1 How to Add ADF Bindings to Selection Lists ........................................................... 13-1313.6.2 What Happens When You Add ADF Bindings to a Selection List.......................... 13-1413.7 Adding ADF Bindings to Trees and Tree Tables .............................................................. 13-1613.7.1 How to Add ADF Bindings to Trees and Tree Tables............................................... 13-1613.7.2 What Happens When You Add ADF Bindings to a Tree or Tree Table................. 13-17

    14 Changing the Appearance of Your Application 14.1 Introduction to Changing ADF Faces Components ........................................................... 14-114.2 Changing the Style Properties of a Component .................................................................. 14-2

  • xiii

    14.2.1 How to Set a Components Style Attributes ................................................................ 14-214.2.2 What Happens When You Format Text ........................................................................ 14-314.3 Using Skins to Change the Look and Feel............................................................................ 14-314.3.1 How to Use Skins.............................................................................................................. 14-614.3.1.1 Creating a Custom Skin............................................................................................ 14-814.3.1.2 Configuring an Application to Use a Skin........................................................... 14-1114.4 Internationalizing Your Application................................................................................... 14-1114.4.1 How to Internationalize an Application...................................................................... 14-1514.4.2 How to Configure Optional Localization Properties for ADF Faces ...................... 14-19

    15 Optimizing Application Performance with Caching15.1 About Caching.......................................................................................................................... 15-115.2 Using ADF Faces Cache to Cache Content .......................................................................... 15-215.2.1 How to Add Support for ADF Faces Cache.................................................................. 15-615.2.2 What Happens When You Cache Fragments ............................................................... 15-715.2.2.1 Logging ....................................................................................................................... 15-715.2.2.2 AFC Statistics Servlet ................................................................................................ 15-715.2.2.3 Visual Diagnostics ..................................................................................................... 15-815.2.3 What You May Need to Know........................................................................................ 15-9

    16 Testing and Debugging Web Applications 16.1 Getting Started with Oracle ADF Model Debugging ......................................................... 16-116.2 Correcting Simple Oracle ADF Compilation Errors ........................................................... 16-216.3 Correcting Simple Oracle ADF Runtime Errors.................................................................. 16-416.4 Understanding a Typical Oracle ADF Model Debugging Session ................................... 16-616.4.1 Creating an Oracle ADF Debugging Configuration.................................................... 16-716.5 Debugging the Oracle ADF Model Layer ............................................................................ 16-816.5.1 Correcting Failures to Display Pages............................................................................. 16-816.5.1.1 Fixing Binding Context Creation Errors ................................................................ 16-816.5.1.2 Fixing Binding Container Creation Errors........................................................... 16-1016.5.2 Correcting Failures to Display Data............................................................................. 16-1216.5.2.1 Fixing Executable Errors......................................................................................... 16-1216.5.2.2 Fixing Render Value Errors Before Submit ......................................................... 16-1716.5.3 Correcting Failures to Invoke Actions and Methods ................................................ 16-2016.5.4 Correcting Page Validation Failures ............................................................................ 16-2416.6 Tracing EL Expressions......................................................................................................... 16-25

  • xiv

    Part III Implementing Projects With Oracle ADF

    17 Working Productively in Teams 17.1 Using CVS with an ADF Project ............................................................................................ 17-117.1.1 Choice of Internal or External CVS Client .................................................................... 17-117.1.2 Preference Settings............................................................................................................ 17-117.1.3 File Dependencies ............................................................................................................. 17-117.1.4 Committing Application and Project Control Files (.jws, .jpr)................................... 17-217.1.5 Consistency of Names that can be Created Independently by Members

    of the Development Team ............................................................................................... 17-217.1.6 General Advice for Committing ADF Work to CVS ................................................... 17-217.1.7 Check Out or Update from the CVS Repository .......................................................... 17-217.1.8 Special Consideration when Manually Adding Navigation Rules to the

    faces-config.xml File ......................................................................................................... 17-317.2 General Advice for Using CVS with JDeveloper................................................................. 17-317.2.1 Team-Level Activities ...................................................................................................... 17-317.2.2 Developer-Level Activities .............................................................................................. 17-3

    18 Adding Security to an Application18.1 Introduction to Security in Oracle ADF Web Applications............................................... 18-118.2 Specifying the JAZN Resource Provider .............................................................................. 18-218.2.1 How To Specify the Resource Provider......................................................................... 18-218.2.2 What You May Need to Know About Oracle ADF Security and Resource

    Providers ............................................................................................................................ 18-318.3 Configuring Authentication Within the web.xml File........................................................ 18-418.3.1 How to Enable Oracle ADF Authentication ................................................................. 18-418.3.2 What Happens When You Use Security Constraints with Oracle ADF................... 18-718.3.3 How to Enable J2EE Container-Managed Authentication ......................................... 18-718.3.4 What Happens When You Use Security Constraints without Oracle ADF

    Security............................................................................................................................... 18-918.4 Creating a Login Page ............................................................................................................. 18-918.4.1 Wiring the Login and Error Pages................................................................................ 18-1318.5 Creating a Logout Page......................................................................................................... 18-1318.5.1 Wiring the Logout Action.............................................................................................. 18-1518.6 Implementing Authorization Using Oracle ADF Security .............................................. 18-1518.6.1 Configuring the Application to Use Oracle ADF Security Authorization ............. 18-1718.6.1.1 How to Configure Oracle ADF Security Authorization .................................... 18-1718.6.1.2 What Happens When You Configure An Application to Use Oracle

    ADF Security ............................................................................................................ 18-1818.6.1.3 What You May Need to Know About the Authorization Property................. 18-1818.6.2 Setting Authorization on ADF Binding Containers .................................................. 18-1818.6.3 Setting Authorization on ADF Iterator Bindings....................................................... 18-1918.6.4 Setting Authorization on ADF Attribute and MethodAction Bindings ................. 18-1918.6.5 What Happens When Oracle ADF Security Handles Authorization...................... 18-19

  • xv

    18.7 Implementing Authorization Programmatically .............................................................. 18-2018.7.1 Making User Information EL Accessible..................................................................... 18-2118.7.1.1 Creating a Class to Manage Roles ......................................................................... 18-2118.7.1.2 Creating a Managed Bean for the Security Information ................................... 18-2418.7.2 Integrating the Managed Bean with Oracle ADF Model .......................................... 18-2518.7.2.1 Creating a TopLink Named Query To Return a User Object............................ 18-2618.7.2.2 Create a Session Facade Method to Wrap the Named Query........................... 18-2618.7.2.3 Create a Page Definition to Make the Method an EL Accessible Object ......... 18-2718.7.2.4 Executing the Session Facade Method from the UserInfo Bean ....................... 18-29

    19 Advanced TopLink Topics19.1 Introduction to Advanced TopLink Topics ......................................................................... 19-119.2 Using Advanced Parameters (databindings.cpx) ............................................................... 19-119.2.1 Performing Deletes First .................................................................................................. 19-219.2.2 Specifying the TopLink Session File .............................................................................. 19-219.2.3 Specifying the Sequencing............................................................................................... 19-319.3 Configuring Method Access for Relationship ..................................................................... 19-319.4 Using sessions.xml with a TopLink Data Control ............................................................. 19-419.5 Using Multiple Maps with a TopLink Data Control .......................................................... 19-519.6 Compiling TopLink Classes with Specific JDK Versions................................................... 19-7

    20 Creating Data Control Adapters20.1 Introduction to the Simple CSV Data Control Adapter ..................................................... 20-120.2 Overview of Steps to Create a Data Control Adapter ........................................................ 20-220.3 Implement the Abstract Adapter Class ................................................................................ 20-320.3.1 Location of JAR Files ........................................................................................................ 20-320.3.2 Abstract Adapter Class Outline...................................................................................... 20-320.3.3 Complete Source for the SampleDCAdapter Class ..................................................... 20-420.3.4 Implementing the initialize Method .............................................................................. 20-620.3.5 Implementing the invokeUI Method ............................................................................. 20-720.3.6 Implementing the getDefinition Method ...................................................................... 20-820.4 Implement the Data Control Definition Class ..................................................................... 20-820.4.1 Location of JAR Files ........................................................................................................ 20-920.4.2 Data Control Definition Class Outline .......................................................................... 20-920.4.3 Complete Source for the SampleDCDef Class............................................................ 20-1020.4.4 Creating a Default Constructor..................................................................................... 20-1320.4.5 Collecting Metadata from the User .............................................................................. 20-1320.4.6 Defining the Structure of the Data Control................................................................. 20-1420.4.7 Creating an Instance of the Data Control.................................................................... 20-1520.4.8 Setting the Metadata for Runtime ................................................................................ 20-1620.4.9 Setting the Name for the Data Control ........................................................................ 20-1720.5 Implement the Data Control Class ...................................................................................... 20-1720.5.1 Location of JAR Files ...................................................................................................... 20-1820.5.2 Data Control Class Outline ........................................................................................... 20-1820.5.3 Complete Source for the SampleDataControl Class.................................................. 20-1920.5.4 Implementing the invokeOperation Method ............................................................. 20-21

  • xvi

    20.5.4.1 About Calling processResult.................................................................................. 20-2320.5.4.2 Return Value for invokeOperation ....................................................................... 20-2320.5.5 Implementing the getName Method ........................................................................... 20-2320.5.6 Implementing the release Method ............................................................................... 20-2420.5.7 Implementing the getDataProvider Method .............................................................. 20-2420.6 Create any Necessary Supporting Classes ......................................................................... 20-2420.7 Create an XML File to Define Your Adapter ..................................................................... 20-2420.8 Build Your Adapter ............................................................................................................... 20-2620.9 Package and Deploy Your Adapter to JDeveloper ........................................................... 20-2620.10 Location of Javadoc Information ......................................................................................... 20-2820.11 Contents of Supporting Files................................................................................................ 20-2920.11.1 sampleDC.xsd ................................................................................................................. 20-2920.11.2 CSVHandler Class .......................................................................................................... 20-2920.11.3 CSVParser ........................................................................................................................ 20-36

    21 Working with Web Services21.1 What are Web Services............................................................................................................ 21-121.1.1 SOAP .................................................................................................................................. 21-221.1.2 WSDL.................................................................................................................................. 21-221.1.3 UDDI................................................................................................................................... 21-221.1.4 Web Services Interoperability ......................................................................................... 21-321.2 Creating Web Service Data Controls..................................................................................... 21-421.2.1 How to Create a Web Service Data Control.................................................................. 21-421.3 Securing Web Service Data Controls .................................................................................... 21-521.3.1 WS-Security Specification................................................................................................ 21-521.3.2 Creating and Using Keystores ........................................................................................ 21-621.3.2.1 How to Create a Keystore ........................................................................................ 21-621.3.2.2 How to Request a Certificate ................................................................................... 21-721.3.2.3 How to Export a Public Key Certificate ................................................................. 21-821.3.3 Defining Web Service Data Control Security ............................................................... 21-921.3.3.1 How to Set Authentication....................................................................................... 21-921.3.3.2 How to Set Digital Signatures................................................................................ 21-1221.3.3.3 How to Set Encryption and Decryption............................................................... 21-1321.3.3.4 How to Use a Key Store.......................................................................................... 21-14

    22 Deploying ADF Applications22.1 Introduction to Deploying ADF Applications..................................................................... 22-122.2 Deployment Steps .................................................................................................................... 22-222.3 Deployment Techniques ......................................................................................................... 22-722.4 Deploying Applications Using Ant....................................................................................... 22-822.5 Deploying the SRDemo Sample Application....................................................................... 22-8

  • xvii

    22.6 Deploying to Oracle Application Server .............................................................................. 22-922.6.1 Oracle Application Server Versions Supported ........................................................... 22-922.6.2 Oracle Application Server Release 2 (10.1.2) Deployment Notes.............................. 22-922.6.3 Oracle Application Server Deployment Methods...................................................... 22-1022.6.4 Oracle Application Server Deployment to Test Environments ("Automatic

    Deployment") .................................................................................................................. 22-1122.6.5 Oracle Application Server Deployment to Clustered Topologies ........................... 22-1122.7 Deploying to JBoss ................................................................................................................. 22-1122.7.1 JBoss Versions Supported.............................................................................................. 22-1122.7.2 JBoss Deployment Notes ............................................................................................... 22-1122.7.3 JBoss Deployment Methods .......................................................................................... 22-1322.8 Deploying to WebLogic ........................................................................................................ 22-1322.8.1 WebLogic Versions Supported ..................................................................................... 22-1322.8.2 WebLogic Versions 8.1 and 9.0 Deployment Notes................................................... 22-1322.8.3 WebLogic 8.1 Deployment Notes................................................................................. 22-1422.8.4 WebLogic 9.0 Deployment Notes................................................................................. 22-1422.8.5 WebLogic Deployment Methods.................................................................................. 22-1422.9 Deploying to WebSphere...................................................................................................... 22-1522.9.1 WebSphere Versions Supported................................................................................... 22-1522.9.2 WebSphere Deployment Notes .................................................................................... 22-1522.9.3 WebSphere Deployment Methods ............................................................................... 22-1522.10 Deploying to Tomcat ............................................................................................................. 22-1622.10.1 Tomcat Versions Supported.......................................................................................... 22-1622.10.2 Tomcat Deployment Notes............................................................................................ 22-1622.11 Deploying to Application Servers That Support JDK 1.4 ................................................ 22-1622.12 Installing ADF Runtime Library on Third-Party Application Servers .......................... 22-1722.12.1 Installing the ADF Runtime Libraries from JDeveloper ........................................... 22-1722.12.2 Configuring WebSphere 6.0.1 to Run ADF Applications ......................................... 22-2022.12.2.1 Source for install_adflibs_1013.sh Script.............................................................. 22-2122.12.2.2 Source for install_adflibs_1013.cmd Script .......................................................... 22-2322.12.3 Installing the ADF Runtime Libraries Manually ....................................................... 22-2422.12.4 Deleting the ADF Runtime Library.............................................................................. 22-2622.13 Troubleshooting and Verifying the Deployment .............................................................. 22-2722.13.1 "Class Not Found" or "Method Not Found" Errors ................................................... 22-2722.13.2 Application Is Not Using data-sources.xml File on Target Application Server .... 22-2722.13.3 Using jazn-data.xml with the Embedded OC4J Server ............................................. 22-2822.13.4 Error "JBO-30003: The application pool failed to check out an application

    module due to the following exception" ..................................................................... 22-28

    Part IV Appendices

    A Reference ADF XML FilesA.1 About the ADF Metadata Files ................................................................................................ A-1A.2 ADF File Overview Diagram ................................................................................................... A-2A.2.1 Oracle ADF Data Control Files ......................................................................................... A-3A.2.2 Oracle ADF Data Binding Files......................................................................................... A-3A.2.3 Oracle ADF Faces and Web Configuration Files............................................................ A-4

  • xviii

    A.3 ADF File Syntax Diagram......................................................................................................... A-4A.4 DataControls.dcx........................................................................................................................ A-6A.4.1 Syntax of the DataControls.dcx File................................................................................. A-6A.4.2 Sample of the DataControls.dcx File................................................................................ A-9A.4.3 Sample of the adfm.xml File............................................................................................ A-10A.5 Structure Definition Files ........................................................................................................ A-10A.5.1 Syntax for the Structure Definition for a JavaBean...................................................... A-11A.5.2 Sample Structure Definition for the .xml File ........................... A-14A.5.3 Sample Structure Definition for the .xml File.............................. A-15A.5.4 Collection and SingleValue Sample Files ...................................................................... A-17A.6 DataBindings.cpx ..................................................................................................................... A-17A.6.1 DataBindings.cpx Syntax................................................................................................. A-18A.6.2 DataBindings.cpx Sample................................................................................................ A-19A.7 PageDef.xml..................................................................................................... A-20A.7.1 PageDef.xml Syntax.......................................................................................................... A-21A.7.2 PageDef.xml Sample for a Method That Returns a String.......................................... A-30A.7.3 PageDef.xml Sample for a Method that Returns a Collection.................................... A-31A.8 web.xml ..................................................................................................................................... A-31A.8.1 Tasks Supported by the web.xml File............................................................................ A-33A.8.1.1 Configuring for State Saving ................................................................................... A-33A.8.1.2 Configuring for Application View Caching .......................................................... A-34A.8.1.3 Configuring for Debugging ..................................................................................... A-34A.8.1.4 Configuring for File Uploading............................................................................... A-35A.8.1.5 Configuring for ADF Model Binding ..................................................................... A-35A.8.1.6 Other Context Configuration Parameters for JSF ................................................. A-36A.8.1.7 What You May Need to Know ................................................................................ A-36A.9 j2ee-logging.xml ....................................................................................................................... A-37A.9.1 Tasks Supported by the j2ee-logging.xml ..................................................................... A-37A.9.1.1 Change the Logging Level for Oracle ADF Packages .......................................... A-37A.9.1.2 Redirect the Log Output........................................................................................... A-37A.9.1.3 Change the Location of the Log File ....................................................................... A-38A.10 faces-config.xml........................................................................................................................ A-38A.10.1 Tasks Supported by the faces-config.xml...................................................................... A-39A.10.1.1 Registering a Render Kit for ADF Faces Components......................................... A-39A.10.1.2 Registering a Phase Listener for ADF Binding...................................................... A-39A.10.1.3 Registering a Message Resource Bundle................................................................ A-40A.10.1.4 Configuring for Supported Locales ........................................................................ A-40A.10.1.5 Creating Navigation Rules and Cases .................................................................... A-40A.10.1.6 Registering Custom Validators and Converters ................................................... A-42A.10.1.7 Registering Managed Beans..................................................................................... A-42A.11 adf-faces-config.xml................................................................................................................. A-44A.11.1 Tasks Supported by adf-faces-config.xml ..................................................................... A-44A.11.1.1 Configuring Accessibility Levels............................................................................. A-44A.11.1.2 Configuring Currency Code and Separators for Number Groups and

    Decimals...................................................................................................................... A-45A.11.1.3 Configuring For Enhanced Debugging Output .................................................... A-45A.11.1.4 Configuring for Client-Side Validation and Conversion..................................... A-46A.11.1.5 Configuring the Language Reading Direction...................................................... A-46

  • xix

    A.11.1.6 Configuring the Skin Family.................................................................................... A-46A.11.1.7 Configuring the Output Mode ................................................................................ A-46A.11.1.8 Configuring the Number of Active ProcessScope Instances............................... A-47A.11.1.9 Configuring the Time Zone and Year Offset ......................................................... A-47A.11.1.10 Configuring a Custom Uploaded File Processor .................................................. A-47A.11.1.11 Configuring the Help Site URL ............................................................................... A-48A.11.1.12 Retrieving Configuration Property Values From adf-faces-config.xml ............ A-48A.12 adf-faces-skins.xml .................................................................................................................. A-49A.12.1 Tasks Supported by adf-faces-skins.xml ....................................................................... A-49

    B Reference ADF Binding PropertiesB.1 EL Properties of Oracle ADF Bindings ................................................................................... B-1

    Index

  • xx

  • xix

    Preface

    Welcome to the Oracle Application Development Framework Developers Guide!

    AudienceThis manual is intended for software developers who are creating and deploying applications using the Oracle Application Development Framework with JavaServer Faces, ADF Faces, TopLink Java Objects, and EJB 3.0 session beans.

    Documentation AccessibilityOur goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For more information, visit the Oracle Accessibility Program Web site at

    http://www.oracle.com/accessibility/

    Accessibility of Code Examples in DocumentationScreen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.

    Accessibility of Links to External Web Sites in DocumentationThis documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

    TTY Access to Oracle Support ServicesOracle provides dedicated Text Telephone (TTY) access to Oracle Support Services within the United States of America 24 hours a day, seven days a week. For TTY support, call 800.446.2398.

  • xx

    Related DocumentsFor more information, see the following documents in the Oracle Other Product One Release 7.0 documentation set or in the Oracle Other Product Two Release 6.1 documentation set:

    Oracle JDeveloper 10g Release Notes, included with your JDeveloper 10g installation, and on Oracle Technology Network

    Oracle JDeveloper 10g Online Help

    Oracle Application Server 10g Release Notes

    Oracle Application Server 10g Documentation Library available on CD-ROM and on Oracle Technology Network

    ConventionsThe following text conventions are used in this document:

    Convention Meaningboldface Boldface type indicates graphical user interface elements associated

    with an action, or terms defined in text or the glossary.

    italic Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.

    monospace Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

  • Part IGetting Started with Oracle ADF

    Applications

    Part I contains the following chapters:

    Chapter 1, "Introduction to Oracle ADF Applications"

    Chapter 2, "Oracle ADF Service Request Demo Overview"

    Chapter 3, "Building and Using Application Services"

  • Introduction to Oracle ADF Applications 1-1

    1Introduction to Oracle ADF Applications

    This chapter describes the architecture and key functionality of the Oracle Application Development Framework and highlights the typical development process for using JDeveloper 10g Release 3 (10.1.3) to build web applications using Oracle ADF, Enterprise JavaBeans, Oracle TopLink, and JSF.

    This chapter includes the following sections:

    Section 1.1, "Overview of Oracle Application Development Framework"

    Section 1.2, "Development Process with Oracle ADF and JavaServer Faces"

    1.1 Overview of Oracle Application Development FrameworkThe Oracle Application Development Framework (Oracle ADF) is an end-to-end application framework that builds on J2EE standards and open-source technologies to simplify and accelerate implementing service-oriented applications. If you develop enterprise solutions that search, display, create, modify, and validate data using web, wireless, desktop, or web services interfaces, Oracle ADF can simplify your job. Used in tandem, Oracle JDeveloper 10g and Oracle ADF give you an environment that covers the full development lifecycle from design to deployment, with drag-and-drop data binding, visual UI design, and team development features built-in.

    1.1.1 Framework Architecture and Supported TechnologiesIn line