0%

Book Description

Enhance your JSF web applications using powerful AJAX components

  • Build a new RichFaces JSF project in minutes using JBoss RichFaces with JBoss Seam and Facelets

  • Customize the look-and-feel of your JSF applications with Skinnability

  • Integrate AJAX into your applications without using JavaScript

  • Create, customize, and deploy new skins for the RichFaces framework using the powerful plug'n'skin feature

  • In More Detail

In Detail

JBoss RichFaces is a rich component library for JavaServer Faces and an AJAX framework that allows easy integration of AJAX capabilities into complex business applications. Do you wish to eliminate the time involved in writing JavaScript code and managing JavaScript-compatibility between browsers to build an AJAX web application quickly?

This book goes beyond the documentation to teach you how to do that. It will show you how to get the most out of JBoss RichFaces by explaining the key components and how you can use them to enhance your applications. Most importantly, you will learn how to integrate AJAX into your applications without using JavaScript but only standard JSF components. You will learn how to create and customize your own components and add them to your new or existing applications.First, the book introduces you to JBoss RichFaces and its components. It uses many examples of AJAX components which, among others, include: Calendar, Data Table, ToolTip, ToolBar, Menu, RichEditor, Drag'n'Drop. All these components will help you create the web site you always imagined. Key aspects of the RichFaces framework such as the AJAX framework, skinnability, and CDK (Component Development Kit) will help you customize the look of your web application. As you progress through the book, you will see a sample application that shows you how to build an advanced contact manager. You're also going to be amazed to know about the advanced topics you will learn like developing new components, new skins, optimizing a web application, inserting components dynamically using Java instead of XHTML, and using JavaScript to manage components. This book is more than a reference with component example code: it's a manual that will guide you, step-by-step, through the development of a real AJAX JSF web application.

Table of Contents

  1. JBoss RichFaces 3.3
    1. JBoss RichFaces 3.3
    2. Credits
    3. About the Author
    4. About the Reviewer
    5. Preface
      1. What this book covers
      2. Who this book is for
      3. Conventions
      4. Reader feedback
      5. Customer support
        1. Errata
        2. Piracy
        3. Questions
    6. 1. What is RichFaces?
      1. An overview of RichFaces
      2. A bit of history
      3. The Ajax framework
        1. Ajax Action Components
        2. Ajax Containers
        3. Ajax placeholders
        4. Ajax validators
      4. RichFaces components overview
      5. RichFaces skinnability overview
      6. Summary
    7. 2. Getting Ready
      1. Creating a RichFaces JSF project the simple way
        1. Seam-gen
          1. Download and install seam-gen
          2. Generating a project using seam-gen
            1. Update RichFaces libraries in a seam-gen generated project
        2. Overview of the project structure
          1. Incremental hot deployment
        3. Seam and Facelets support
      2. Adding RichFaces manually to your existing JSF project
        1. Downloading RichFaces
        2. Basic configuration
          1. Where to put the libraries
        3. Registering RichFaces
        4. Facelets support
      3. IDEs
        1. Eclipse/JBoss Tools
          1. Where to download and how to install it
          2. JBoss Developer Studio
          3. Importing a seam-gen generated project into Eclipse
        2. IntelliJ Idea
          1. Where to download and how to install it
      4. Summary
    8. 3. First Steps
      1. A simple contact manager
        1. Creating the new project
        2. Templating and Facelets
        3. Modifying the created project
        4. The model
        5. The managed bean
          1. Making it a managed bean
        6. The "Insert new contact" form
          1. The main box
          2. The form fields
            1. Using RichFaces message and messages components instead of the standard ones
            2. Validating our field in a simple way
            3. Adding Ajax to standard JSF components: a4j:support
            4. Calendar field
            5. Simple layout components: rich:separator and rich:spacer
          3. Ajax command buttons: a4j:commandButton
          4. Ajax command links: a4j:commandLink
        7. The contact list
        8. Re-rendering the contact list after adding a new contact
        9. Adding the delete button
      2. Summary
    9. 4. The Application
      1. What we are going to develop?
        1. Features
          1. Groups manager
          2. File uploads and notes
          3. Simple search
          4. User skin
          5. Multilanguage
      2. The database: E-R diagram
      3. Importing the database
      4. Creating the project
      5. The class diagram
        1. Some modification to the entities
        2. Editing the template page
      6. The menu page
      7. The login page
      8. The home page
      9. Summary
    10. 5. Making the Application Structure
      1. Skinnability and dynamic skin change
        1. Selecting the application skin
        2. User-selected application skin
          1. Passing application parameters using components.xml
          2. Making skin selection user-dependent
        3. Standard controls skinning
        4. XCSS and Plug-n-Skin
          1. Adding built-in plug'n'skin skins
        5. Some examples
      2. Internationalization
        1. Configuration
        2. Internationalize strings
        3. User-selected language
          1. Persist the selected locale using a cookie
      3. Menu bar using rich:toolBar component
      4. Making the login work
      5. User registration
        1. Creating the page structure
        2. Creating the support bean
        3. Creating the form fields and action buttons
        4. Adding the validation rules
        5. Adding the sign up link to the menu bar
        6. Validating the password against another "Rewrite password" field
        7. Making your own validators
        8. Using a captcha
          1. Resetting the captcha
        9. Automatic login after registration
        10. Sending the confirmation emails
        11. Screenshot
      6. Reset password box
      7. Forgot username box
      8. URL rewriting: making it simple and powerful
      9. Summary
    11. 6. Making the Contacts List and Detail
      1. The main layout
        1. Ajax placeholders
        2. The groups box
      2. The contacts list
        1. Differences between h:dataTable and rich:dataTable
        2. Data pagination
        3. Adding the column headers
        4. Columns and column groups
        5. Out-of-the-box filtering and sorting
        6. The bottom toolbar
        7. The backing bean
      3. The contact detail
        1. The support bean
        2. Selecting the contact from the contacts list
        3. Adding a new contact
        4. Viewing contact detail
        5. Editing contact detail
          1. The button toolbar
        6. The ajaxSingle and the process attributes
        7. More Ajax!
        8. Ajax containers
        9. Data iteration using RichFaces
          1. Data pagination with data iteration components
        10. Addresses management
        11. Some screenshots
      4. Summary
    12. 7. Finishing the Application
      1. Taking a note of every contact
        1. A richer editor
      2. Let's group our contacts
        1. Listing, adding, and removing groups
          1. Other features of the rich:toolTip component
          2. Adding and editing groups
          3. The adding/editing form
        2. Adding contacts to a group using the drag 'n' drop
        3. Removing contacts from a group using drag'n'drop
      3. Attaching files
        1. Creating the wizard
          1. The file review step
        2. Creating the modal panel
          1. Control components without JavaScript
        3. Inserting the wizard inside the modal panel
        4. Finishing the file upload feature
      4. Summary
    13. 8. Skin Customization
      1. Skinnability
      2. Customize skin parameters
        1. Edit a basic skin
        2. Using CSS
          1. Redefine the skin-inserted CSS classes
          2. Specify our specific CSS classes
      3. Using skins with non-skinnable components
        1. Standard controls skinning
        2. XCSS
      4. Summary
    14. 9. Creating a New plug 'n' skin
      1. Installing Maven
      2. Creating the new skin
      3. Customizing the new skin
      4. Packaging and deploying the new skin
      5. Summary
    15. 10. Advanced Techniques
      1. Poll
        1. Creating images dynamically
      2. Push
      3. Creating a RichFaces JavaScript function
      4. Partial update of data iteration components
      5. RichFaces component binding in JBoss Seam / JBoss Application Server environment
        1. Moving all the libraries to the EAR
        2. A simple binding example
      6. The tree component
        1. State saving
        2. Action listeners
      7. Controlling the session expiration
      8. Summary
    16. 11. Component Development Kit
      1. Configuring the environment
        1. Installing Maven
        2. Configuring
      2. Creating the project
        1. Generating the template
        2. Testing the template
      3. Creating the component
        1. Component configuration
        2. Component resources
        3. Component renderer
      4. Testing the new component
      5. Summary
3.145.86.183