Beginning JSF™ 2 APIs and JBoss® Seam

Book description

The Enterprise Java™ platform, Java EE 6, has gotten a facelift ... JavaServer™ Faces (JSF™) 2, is a big part of what's new in Java EE 6! JSF 2, a significant upgrade from JSF 1.2, includes Facelets and integration/use options with a variety of web frameworks, including the popular JBoss® Seam and even the Spring Framework.

Beginning JSF™ 2 APIs and JBoss® Seam gets you up to speed with the JSF 2.x API features and how they're implemented using the latest Seam web framework. This quick–start tutorial is the fastest way to get started on JSF 2, Facelets, and Seam, and with it you'll take the most useful features in the frameworks and apply them using best practices.

You'll learn to create and enhance an eShop using practical methods, and can re-purpose the template for your own personal and professional projects.

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright
  4. Contents at a Glance
  5. Contents
  6. About the Author
  7. About The Technical Reviewer
  8. CHAPTER 1: Getting Started with JSF
    1. Introducing the “Hello world” Application
      1. Installing Eclipse
      2. Installing JBoss
      3. Installing a JSF Implementation
      4. Installing Web Beans
    2. Creating the “Hello world!” Application with JSF
      1. Generating Dynamic Content
      2. Retrieving Data from Java Code
      3. Exploring the Life Cycle of the Web Bean
      4. Using an Easier Way to Output Text
    3. Debugging a JSF Application
    4. Summary
  9. CHAPTER 2: Using Forms
    1. Developing a Stock Quote Application
      1. Getting the Stock Quote Symbol
      2. Displaying the Result Page
      3. Displaying the Stock Value
      4. Marking Input As Required
      5. Inputting a Date
      6. Conversion Errors and Empty Input
      7. Using a Combo Box
      8. Using a Single b2 Bean
      9. Hooking Up the Web Beans
    2. Summary
  10. CHAPTER 3: Validating Input
    1. Developing a Postage Calculator
      1. What If the Input Is Invalid?
      2. Null Input and Validators
      3. Validating the Patron Code
      4. Creating a Custom Validator for the Patron Code
      5. Displaying the Error Messages in Red
      6. Displaying the Error Message Along with the Field
      7. Validating a Combination of Multiple Input Values
    2. Summary
  11. CHAPTER 4: Creating an E-shop
    1. Listing the Products
    2. Making the Link to Show the Details
    3. Displaying Headers in the Columns
    4. Implementing a Shopping Cart
    5. Displaying the Content of the Shopping Cart
    6. The Checkout Function
    7. Getting the Credit Card Number of the Current User
    8. Forcing the User to Log In
    9. Implementing Logout
    10. Protecting the Password
    11. Summary
  12. CHAPTER 5: Creating Custom Components
    1. Displaying a Copyright Notice on Multiple Pages
    2. Allowing the Caller to Specify the Company Name
    3. Creating a Product Editor
    4. Passing a Method in a Parameter?
    5. Creating a Box Component
    6. Accepting Two Pieces of XHTML Code
    7. Creating a Reusable Component Library
    8. Creating a Component Library Without taglib.xml
    9. Summary
  13. CHAPTER 6: Providing a Common Layout for Your Pages
    1. Using the Same Menu on Different Pages
    2. Using Global Navigation Rules
    3. Using Two Abstract Parts
    4. Creating Page-Specific Navigation Cases
    5. Summary
  14. CHAPTER 7: Building Interactive Pages with Ajax
    1. Displaying a FAQ
    2. Refreshing the Answer Only
    3. Hiding and Showing the Answer
    4. Using Ajax to Hide or Show the Answer
    5. Giving a Rating to a Question
    6. Updating the Rating as the User Types
    7. Using a Dialog Box to Get the Rating
    8. Setting the Look and Feel with Skins
    9. Displaying Multiple Questions
    10. Summary
  15. CHAPTER 8: Using Conversations
    1. Creating a Wizard to Submit Support Tickets
    2. Interference Between Browser Windows
    3. URL Mismatched?
    4. Summary
  16. CHAPTER 9: Supporting Other Languages
    1. Displaying the Current Date and Time
    2. Supporting Chinese
    3. Easier Way to Access Map Elements
    4. Internationalizing the Date Display
    5. Letting the User Change the Language Used
    6. Localizing the Full Stop
    7. Displaying a Logo
    8. Making the Locale Change Persistent
    9. Localizing Validation Messages
    10. Summary
  17. CHAPTER 10: Using JBoss Seam
    1. Installing Seam
    2. Re-creating the E-shop Project
    3. Allowing the User to Add Products
    4. Restricting Access to the Product-Editing Page
    5. Creating a Shopping Cart
    6. Turning the Shopping Cart into a Stateful Session Bean
    7. Creating the Checkout Page
    8. Using WebLogic, WebSphere, or GlassFish
    9. Summary
  18. Index

Product information

  • Title: Beginning JSF™ 2 APIs and JBoss® Seam
  • Author(s): Kent Ka Iok Tong
  • Release date: May 2009
  • Publisher(s): Apress
  • ISBN: 9781430219224