Oracle Fusion Developer Guide
Oracle Fusion Developer GuideThe McGraw-HillCompaniesCopyright@ 2010 by The McGraw-Hill Companies, Inc. All rights reserved. Except as permitted under the United States Copyright Act of 1976,no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without theprior written permission of the publisher.ISBN:978-0-07-162255-4MHID:0-07-162255-1The material in this e Book also appears in the print version of this title: ISBN: 978-0-07-162254-7, MHID: 0-07-162254-3All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, weuse names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where suchdesignations appear in this book, they have been printed with initial capsMcGraw-Hill e Books are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate trainingprogramsTocontactarepresentativepleasee-mailusatbulksales@mcgraw-hill.comInformation has been obtained by Publisher from sources believed to be reliable. However, because of the possibility of human or mechanicalerror by our sources, Publisher, or others, Publisher does not guarantee to the accuracy, adequacy, or completeness of any information included inthis work and is not responsible for any errors or omissions or the results obtained from the use of such informationOracle Corporation does not make any representations or warranties as to the accuracy, adequacy, or completeness of any information containedin this work, and is not responsible for any errors or omissionsTERMS OF USEThis is a copyrighted work and The McGraw-Hill Companies, Inc("McGraw-Hill )and its licensors reserve all rights in and to the work. Use ofthis work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the workyou may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminateell, publish or sublicense the work or any part of it without McGraw-Hill's prior consent. You may use the work for your own noncommercialand personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with thesetermsTHE WORK IS PROVIDED"AS IS. MCGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THEACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK INCLUDING ANYINFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE AND EXPRESSLY DISCLAIMANY WARRANTY EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITYOR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in thework will meet your requirements or that its operation will be uninterrupted or error free. Neither Mc Graw-Hill nor its licensors shall be liable toyou or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hillhas no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or itslicensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use thework, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or causewhatsoever whether such claim or cause arises in contract tort or otherwiseGOUR FREE SUBSCRIPTIONTO ORACLE MAGAZINEOracle Magazine is essential gear for today s information technology professionalsStay informed and increase your productivity with every issue of Oracle MagazineInside each free bimonthly issue you'll getORACLEUp-to-date information on Oracle Database, Oracle Application Server,Web development, enterprise grid computing, database technologyand business trendsMANAGEThird-party news and announcementsCHANGETechnical articles on Oracle and partner products, technologiesWITH ORACLE DATABASE 119and operating environmentsDevelopment and administration tipsReal-world customer stories,m=If there are other oracle users atyour location who would like toreceive their own subscription to Three easy ways to subscribeOracle Magazine, please photocopy this form and pass it alongWebVisit our Web site at oracle. com/oraclemagazineYou'l find a subscription form there, plus muchORACLE OFaxComplete the questionnaire on the back of this cardand fax the questionnaire side only to +1.847.763.9638M A GAZNE③MailComplete the questionnaire on the back of this cardand mail it to p.o. box 1263, skokie. L 60076-8263ORACL∈Copyright C 2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective ownersWant your own FREE subscription?To receive a free subscription to Oracle Magazine, you must fill out the entire card, sign it, and datit (incomplete cards cannot be processed or acknowledged). You can also fax your application to+1.847.763.9638 Or subscribe at our Web site at oracle. com/oraclemagazineO Yes, please send me a FREE subscription Oracle Magazine. oO From time to time, Oracle Publishing allows our partnersexclusive access to our e-mail addresses for special promo-tions and announcements. to be included in this program,please check this circle. If you do not wish to be included, you signature (require d)will only receive notices about your subscription via e-mailn a m eO Oracle Publishing allows sharing of our postal mailing list withselected third parties. If you prefer your mailing address not tocompanye-mail addressbe included in this program please check this circleIf at any time you would like to be removed from eitherCustomer service at +1.847763.9635 or send an e-mail to oracle halldata comstreet/p0.boxIf you opt in to the sharing of information, Oracle may also provide you withunsubscribe rom any e ma com munication from oracle, please send an email toy city/state/zip or postal codete Ie p hunsubscribe @ oracle-mail com with the following in the subject line: REMOVE lyourmail address]. For complete information on Oracle Publishing s privacy practices,please visit oracle. com/html/privacy/htmcountryfaxWould you like to receive your free subscription in digital format instead of print if it becomes available? O Yes ONoYOU MUST ANSWER ALL 10 QUESTIONS BELOWOWHAT IS THE PRIMARY BUSINESS ACTIVITYWHAT IS YOUR CURRENT PRIMARY OPERATING口18 Minicomputer口05 Hibernate口17SaLOF YOUR FIRM AT THIS LOCATION? (checkPLATFORM(check all that apply)口19mtex86(32)口06J++/#口18 Visual basicone only)O 01 Digital Equipment Corp UNIX/VAX/VMS口20 Intel x864)口08JSPD 01 Aerospace and Defense Manufacturing口02 HP UNIX口21 Network ComputerD 02 Application Service Provider口03 IBM AIXD 22 Symmetric Multiprocessing口09.NET口04| BM UNIXServices口10PerlD 03 Automotive Manufacturing口04 Chemicals口05 Linux( Red Hat)SERVICES口11PHPa 05 Media and entertainment口06Liux(SUSE)口24 Consulting口12PL/SQLD 06 Construction/EngineeringD 07 Linux(Oracle Enterprise)口25 Education/ Training07 Consumer Sector/Consumer Packaged口08 Linux ( other))口26 Maintenance口09 Macintosh口270 nline database(WHAT ORACLE PRODUCTS ARE IN USEATYOURSITE? (check all that apply口08 Education口10MVS口28 Supporto 09 Financial services/Insurance口11 NetwareD 29 Technology-Based TrainingORACLE DATABASE口10 Health care口12 Network Computing口300ther口010 racle database11gD 11 High Technology Manufacturing, OEM口13SC0UNX99口 None of the abovea 02 Oracle Database 10 gD 12 Industrial Manufacturing口14 Sun solaris/Sun0S口030 racle9 i DatabaseD 13 Independent Software Vendor口15 Windowa 04 Oracle embedded DatabaseD 14 Life Sciences(biotech, pharmaceuticals)口160 ther unixWHAT IS YOUR COMPANYS SIZE?(Oracle Lite, Times Ten, Berkeley DB)口15 Natural resources口980ther(check one only)a 05 Other Oracle database release口160 il and Gas99口 None of the abea 17 Professional servicesD 01 More than 25, 000 EmployeesORACLE FUSION MIDDLEWAREo 02 10,001 to 25,000 EmployeesD 06 Oracle Application ServerD 18 Public Sector governmentDO YOU EVALUATE SPECIFY RECOMMEND口035.001t010.000Emp0yes口070 Iracle portal口19 Researcha 20 Retail/ Wholesale/DistributionOR AUTHORIZE THE PURCHASE OF ANYD 041.001 to 5.000 Employees08 Oracle Enterprise ManagerD 21 Systems Integrator, VAR/VADTHE FOLLOWING? (check all that apply)百05101t01.0 mployeeso 09 Oracle BPEL Process Manager口22 Telecommunica06 Fewer than 100 Employo 10 Oracle Identity Managemer口01 HardwD 23 Travel and Transportation口110 racle s0 A Suiteo 02 Business applications(ERP, CRM, etc口120 racle Data HubsD 24 Utilities(electric, gas, sanitation, water)D 03 Application Development Toolso 98 Other business and servicesODURING THE NEXT 12 MONTHS,HOW MUCH口04 Database productsDO YOU ANTICIPATE YOUR ORGANIZATIONORACLE DEVELOPMENT TOOLS0 05 Internet or Intranet ProductsWILL SPEND ON COMPUTER HARDWARE口130 racle JDevelopere WHICH OF THE FOLLOWING BEST DESCRIBES口060 Ither softwareSOFTWARE PERIPHERALS AND SERVICES FOR口140 racle formsa 07 Middleware productsYOUR LOCATION? (check one only)口150 racle Reports99口 None of the above口160 racle Designer(check one only)口01 Less than$1000口170 racle discovererCORPORATE MANAGEMENT/STAFF口02S10.000tos49999口180 racle b| Beans口03S50.00ts9999D 01 Executive Management(President, Cha6 IN YOUR JOB. DO YOU USE OR PLAN TO PURo 19 Oracle Warehouse BuilderCEO, CFO, Owner, Partner, Principal)CHASE ANY OF THE FOLLOWING PRODUCTS口04S100.00toS499.99口200 racle webCenter口05S500.00tos999a 02 Finance/Administrative Management(check all that apply)D 21 Oracle Application Express口06S100.00and0ver(VP/Director/Manager/Controller,SOFTWAREORACLE APPLICATIONSPurchasing, Administration)口03 Sales/MarketingMttratio口01 CAD/CAE/CAMo 22 Oracle E-Business suitea 02 Collaboration SoftwareWHAT IS YOUR COMPANYS YEARLY SALESD 23 People Soft Enterprise(VP/Director/Manager)口03 CommunicationsREVENUE? (check one onlyo 24 JD Edwards EnterpriseOneQ 04 Computer Systems/OperationsD 04 Database Managemen口25 JD Edwards worldManagemen口05 File ManagementD 01 S500, 000, 000 and above口260 racle fusionCIO/VP/Director/Manager MIS/IS/IT, Ops)口06 Finance口27 HyperionIS/IT STAFF口02S100,00.00toS50,00.000口07Java口03S50.00.00ts100,00.000口28 Siebel crmD 05 Application Development/ProgrammingD 08 Multimedia Authoring口04S5,00.000toS5.00.000ORACLE SERVICES口09 Networking口05S1,00.000toS5,00,000D 06 Application Development/Programming口10 Programminga 28 Oracle e-Business suite on demandStaffD 11 Project Managemento 29 Oracle Technology On Demand口07 ConsultingWHAT LANGUAGES AND FRAMEWORKS DO口30 Siebel crm0 n Demando 12 Scientific and EngineeringD 08 DBA/Systems Administratora 13 Systems ManagementUSE? (check all that apply)口310 racle ConsultingQ 09 Education/Training口14 Workflow口320 racle educationD 10 Technical Support Director/Manager口330 Iracle supHARDWARE口01Ajax口13 PythonD 11 Other Technical Management/Staff口980thet口980ther口15 Macintosh口02C口14 Ruby/ rails99口 None of the above口16 Mainframe口03C++口15 Springo 17 Massively Parallel Processing口04C#口16 StrutsTo old dogs learning new tricks.About the authorsFrank Nimphius has been a principal product manager for Application DevelopmentTools at Oracle Corporation since 1999. Prior to this he worked for OracleGermany for more than three years in the Oracle Sales Consulting Organizationwith a focus on Oracle Forms. As a product manager, Frank actively contributesto the development of Oracle Developer and the Oracle Application DevelopmentFramework(adf).FrankrunstheadFCodeCornerwebsiteatwww.oracle.com/technology/products/jdev/tips/fnimphius/index. html and helps users at the oracleJdeVeloperforumathttp://forums.oraclecom/forums/forumjspa?forumid=83Lynn Munsinger is a principal product manager for the ApplicationDevelopment Tools group at Oracle, specializing in Developer and ADF. Hercareer at Oracle began in 1998, and she has been responsible for the supporteducation, and technical evangelism of Oracles application development toolsever since. Lynn is the primary developer of the Fusion Order Demo sampleapplication for Fusion Middleware, and she is a frequent presenter at user groupand industry conferencesContentsForeword··申AcknowledgmentsXIXIntroduction1 The Quick Learner's Guide to Oracle Fusion Web Application DevelopmentBuilding Oracle Fusion ApplicationsOracle adeBuilding a Fusion Application Workspace in Oracle )DeveloperADF Business Components for Quick Learners33467Maturity Through HistoryFramework Classes7Creating a Business Components Mode8Entity Objects10AssociationsView Objects12lew LinKsApplication Modules16Oracle ADF for Quick Learners18Maturity Through History18Data Controls18The Oracle Developer Data Control Palette20The role of the adF Binding Layer21ADF Binding Classes23Java Server Faces for Quick Learners23Architecture overview23BuildinBlocks25Expression Language26Context and Application Objects29Configuration Files30nd Backing Beans30Events34Navigati34Oracle Fusion Developer GuideADF Faces Rich Client for Quick Learners37Maturity Through History38Two More Context classes.38Configuration39Components40ADF Component Binding41Partial Page Rendering42Summary.442 Oracle Application Development Framework(ADF)∴…………45The aDF Model framework47ADF Data Controls47Creating adF Bindings47Drag-and-Drop Data Bindings48The Page Definition File50Accessing the Binding Layer57Accessing the binding layer from Expression language57Accessing the binding layer from java57Summary3 The Oracle adf and adF Faces rich Client Lifecycle ............. 63Java Server Faces Lifecycle64Phase listener66A Close look at the immediate Attribute6871ADF Faces Rich Client Lifecycle71Partial Page Rendering71Optimized lifecycle73Client-side value Lifecycle77Additional Memory Scopes78Subform Component80Oracle ADF Page Lifecycle82About Iterators and their refresh85Accessing Oracle ADF Business Components87Oracle fusion Page Lifecycle.........,,...89Monitoring the ADF LifecycleHow to Create a Custom Page Phase ListenerHow to Register Global Lifecycle listeners92How to Register Listeners for a Single ADF Bounded Page94How to Register and Deregister Page Listeners Programmatically95Lifecycle customization96Global Page Lifecycle customization96Local Page Lifecycle customization98Use Case Form Entry Wizard99Use Case: Using af: subform in ADF Forms.100Exception Handling and Error Reporting10Creating a Custom Error Handler Class102Registering a Custom Error Handler with ADF102Summary102Contents VTwo Flavors of Task Flow: Unbounded and Bounded4 Introduction to Oracle adf Task flows.,,,103ADF Controller Overview104ADF Controller Architecture.104105ADF Controller Configuration Files106ADF Controller Activities and Control Flow rules108View activit109Method Call ActivitytyRouter Activi113Task Flow Call Activity116Task Flow Return Activity119URL VIew activity120Save point restore activity122Control Flow rules.122Creating managed Beans in ADF Controller..124Memory scopes125Standard Sf and servlet Se..125ADF-specific Scopes126Overview of Common Object Access128Scopes in Action.129ADF Binding132Customizing the Lifecycle for Operation, Method, and Router Activities132Task Flow State Tracking132d error handlg133Save points and "save for later.135Configuring Explicit and Implicit Save points for Oracle fusion Web applications... 137Save point creation and deletion138Creating and Registering a Custom Save Point Listener138ummary1395 Working with Unbounded and Bounded Oracle ADF Task Flows∴∴……∴141Working with Unbounded Task Flows142Creating and Defining an Unbounded Task Flow.142Bookmarking.145How to Pass Values Between Pages......153How to Obtain the request url of a view activity154Working with Multiple Copies of Unbounded Task Flow Definitions154Working with Bounded Task Flows156Creating Bounded Task Flows.157Calling a bounded task flow from a parent Task Flow.162Passing Values to and from Bounded Task Flows163Exception Handl165Declarative Transaction Handling170Browser Back Button Handling.171Open a bounded task flow in a dialog174How to Build a task Flow URL in Java..177How to Navigate Programmatically Among View Activities179How to Navigate to a Specific View When Entering a Bounded Task Flow179How to Determine Whether a Task Flow Contains Uncommitted Data179
用户评论