You are previewing Oracle JDeveloper 11gR2 Cookbook.
O'Reilly logo
Oracle JDeveloper 11gR2 Cookbook

Book Description

Using JDeveloper to build ADF applications is a lot more straightforward when you learn through practical recipes. This book has over 85 of them to take you beyond the basics and raise your knowledge to a new level.

  • Encounter a myriad of ADF tasks to help you enhance the practical application of JDeveloper 11gR2

  • Get to grips with deploying, debugging, testing, profiling and optimizing Fusion Web ADF Applications with JDeveloper 11gR2 in this book and e-book

  • A high level development cookbook with immediately applicable recipes for extending your practical knowledge of building ADF applications

  • In Detail

    Oracle’s Application Development Framework (ADF) for Fusion Web Applications leverages Java EE best practices and proven design patterns to simplify constructing complex web solutions with JDeveloper, and this hands-on, task-based cookbook enables you to realize those complex, enterprise-scale applications. With the help of real-world implementations, practical recipes cover everything from design and construction, to deployment, testing, debugging and optimization.

    This practical, task-based cookbook takes you, the ADF developer, on a practical journey for building Fusion Web Applications. By implementing a range of real world use cases, you will gain invaluable and applicable knowledge for utilizing the ADF framework with JDeveloper 11gR2.

    “Oracle JDeveloper 11gR2 Cookbook” is a task-based guide to the complete lifecycle of Fusion Web Application development using Oracle JDeveloper 11gR2 and ADF.

    You will get quickly up and running with concepts like setting up Application Workspaces and Projects, before delving into specific Business Components such as Entity Objects, View Objects, Application Modules and more. Along the way you will encounter even more practical recipes about ADF Faces UI components and Backing Beans, and the book rounds off by covering security, session timeouts and exceptions.

    With “Oracle JDeveloper 11gR2 Cookbook” in hand you will be equipped with the practical knowledge of a range of ready to use implementation cases which can be applied to your own Fusion Web ADF Applications.

    Table of Contents

    1. Oracle JDeveloper 11gR2 Cookbook
      1. Table of Contents
      2. Oracle JDeveloper 11gR2 Cookbook
      3. Credits
      4. Foreword
      5. About the Author
      6. About the Reviewers
      7. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
          3. Instant Updates on New Packt Books
      8. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      9. 1. Prerequisites to Success: ADF Project Setup and Foundations
        1. Introduction
        2. Installation of JDeveloper on Linux
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Configuring JDeveloper with a 64-bit JDK
            2. Configuring the JDeveloper user directory
        3. Breaking up the application in multiple workspaces
          1. How to do it…
          2. How it works…
          3. There's more…
            1. Adding the ADF Library JAR manually
            2. Defining the application module granularity
            3. Entity objects, list of values (LOVs), validation queries
        4. Setting up BC base classes
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Setting up logging
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Using a custom exception class
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
            1. Bundled Exceptions
          5. See also
        7. Using ADFUtils/JSFUtils
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. Locating an iterator binding
            2. Locating an operation binding
            3. Locating an attribute binding
            4. Getting and setting an attribute binding value
            5. Getting the binding container
            6. Adding Faces messages
            7. Finding a component in the root view
            8. Getting and setting managed bean values
        8. Using page templates
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        9. Using a generic backing bean actions framework
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      10. 2. Dealing with Basics: Entity Objects
        1. Introduction
        2. Using a custom property to populate a sequence attribute
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Overriding doDML() to populate an attribute with a gapless sequence
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Creating and applying property sets
          1. getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Using getPostedAttribute() to determine the posted attribute's value
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Overriding remove() to delete associated children entities
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Overriding remove() to delete a parent entity in an association
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        8. Using a method validator based on a view object accessor
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. There's more...
          5. See also
        9. Using Groovy expressions to resolve validation error message tokens
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        10. Using doDML() to enforce a detail record for a new master record
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      11. 3. A Different Point of View: View Object Techniques
        1. Introduction
        2. Iterating a view object using a secondary rowset iterator
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Pitfalls when iterating over large rowsets
          5. See also
        3. Setting default values for view row attributes
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Specifying default values at the entity object level
          5. See also
        4. Controlling the updatability of view object attributes programmatically
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Controlling attribute updatability at the entity object level
          5. See also
        5. Setting the Queryable property of a view object attribute programmatically
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Using a transient attribute to indicate a new view object row
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Conditionally inserting new rows at the end of the rowset
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Inserting new rows at the beginning of the rowset
          5. See also
        8. Using findAndSetCurrentRowByKey() to set the view object currency
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Range paging optimization
          5. See also
        9. Restoring the current row after a transaction rollback
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. There's more...
          5. See also
        10. Dynamically changing the WHERE clause of the view object query
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        11. Removing a row from a rowset without deleting it from the database
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      12. 4. Important Contributors: List of Values, Bind Variables, View Criteria
        1. Introduction
        2. Setting up multiple LOVs using a switcher attribute
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Setting up cascading LOVs
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        4. Creating static LOVs
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Overriding bindParametersForCollection() to set a view object bind variable
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Creating view criteria programmatically
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        7. Clearing the values of bind variables associated with the view criteria
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        8. Searching case insensitively using view criteria
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      13. 5. Putting them all together: Application Modules
        1. Introduction
        2. Creating and using generic extension interfaces
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Exposing a custom method as a web service
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Accessing a service interface method from another application module
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. A passivation/activation framework for custom session-specific data
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Displaying application module pool statistics
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Using a shared application module for static lookup data
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. There's more...
          5. See also
        8. Using a custom database transaction
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      14. 6. Go with the Flow: Task Flows
        1. Introduction
        2. Using an application module function to initialize a page
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Using a task flow initializer to initialize a task flow
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Calling a task flow as a URL programmatically
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Retrieving the task flow definition programmatically using MetadataService
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Creating a train
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      15. 7. Face Value: ADF Faces, JSF Pages, and User Interface Components
        1. Introduction
        2. Using an af:query component to construct a search page
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Using an af:pop-up component to edit a table row
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Using an af:tree component
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Using an af:selectManyShuttle component
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Using an af:carousel component
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Using an af:poll component to periodically refresh a table
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Using page templates for pop-up reuse
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        9. Exporting data to a client file
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      16. 8. Backing not Baking: Bean Recipes
        1. Introduction
        2. Determining whether the current transaction has pending changes
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Using a custom af:table selection listener
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Using a custom af:query listener to allow execution of a custom application module operation
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Using a custom af:query operation listener to clear both the query criteria and results
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Using a session scope bean to preserve session-wide information
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. Using an af:popup during long running tasks
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Using an af:popup to handle pending changes
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Using an af:iterator to add pagination support to a collection
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      17. 9. Handling Security, Session Timeouts, Exceptions, and Errors
        1. Introduction
        2. Enabling ADF security
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Using a custom login page
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Accessing the application's security information
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Using OPSS to retrieve the authenticated user's profile from the identity store
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Detecting and handling session timeouts
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Using a custom error handler to customize how exceptions are reported to the ViewController
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        8. Customizing the error message details
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        9. Overriding attribute validation exceptions
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      18. 10. Deploying ADF Applications
        1. Introduction
        2. Configuring and using the Standalone WebLogic Server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Deploying on the Standalone WebLogic Server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Using ojdeploy to automate the build process
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Using Hudson as a continuous integration framework
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      19. 11. Refactoring, Debugging, Profiling, and Testing
        1. Introduction
        2. Synchronizing business components with database changes
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        3. Refactoring ADF components
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Configuring and using remote debugging
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Logging Groovy expressions
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        6. Dynamically configuring logging in WebLogic Server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Performing log analysis
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Using CPU profiler for an application running on a standalone WebLogic server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        9. Configuring and using JUnit for unit testing
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      20. 12. Optimizing, Fine-tuning, and Monitoring
        1. Introduction
        2. Using Update Batching for entity objects
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Limiting the rows fetched by a view object
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Limiting large view object query result sets
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Limiting large view object query result sets by using required view criteria
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Using a work manager for processing of long running tasks
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Monitoring the application using JRockit Mission Control
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      21. Index