Beginning JSF 2 APIs and JBoss Seam


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. ...

See more details below
$30.64 price
(Save 23%)$39.99 List Price
Other sellers (Paperback)
  • All (27) from $2.70   
  • New (14) from $3.93   
  • Used (13) from $2.70   
Beginning JSF 2 APIs and JBoss Seam

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$17.99 price
(Save 43%)$31.99 List Price


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.

What you’ll learn

  • Get started with JSF 2 and its features, including forms, validations, and more.
  • Create an eShop.
  • Build interactive pages with Ajax.
  • Incorporate the JSF 2 feature, Facelets, as your standard view definition framework.
  • Provide a common layout using Facelets.
  • Apply and fine–tune your eShop application using the popular JSF–based web framework, JBoss Seam.

Who this book is for

This book is primarily for Java developers who need to develop an application in JSF but are just learning it. It also can be for Java developers who know JSF but would like to learn Facelets and Seam.

Table of Contents

  1. Getting Started with JSF
  2. Using Forms
  3. Validating Input
  4. Creating an E-shop
  5. Creating Custom Components
  6. Providing a Common Layout for Your Pages
  7. Building Interactive Pages with Ajax
  8. Using Conversations
  9. Supporting Other Languages
  10. Using JBoss Seam

Read More Show Less

Product Details

  • ISBN-13: 9781430219224
  • Publisher: Apress
  • Publication date: 5/25/2009
  • Edition number: 1
  • Pages: 300
  • Product dimensions: 7.00 (w) x 9.20 (h) x 1.00 (d)

Meet the Author

Kent Ka Iok Tong is manager of the IT department of the Macau Productivity and Technology Transfer Center. With a master's degree in computer science from the New South Wales University, Sydney, Australia, and having won the ""Macao Programming Competition (Open Category)"" in 1992, Kent has been involved in professional software development, training, and project management since 1993. He is the author of several popular books on web technologies, including Essential JSF, Facelets and Seam, Enjoying Web Development with Tapestry, Enjoying Web Development with Wicket, and Developing Web Services with Apache Axis 2.
Read More Show Less

Table of Contents

About the Author ix

About the Technical Reviewer xi

Chapter 1 Getting Started with JSF 1

Introducing the "Hello world" Application 1

Installing Eclipse 2

Installing JBoss 3

Installing a JSF Implementation 7

Installing Web Beans 8

Creating the "Hello world!" Application with JSF 9

Generating Dynamic Content 17

Retrieving Data from Java Code 20

Exploring the Life Cycle of the Web Bean 25

Using an Easier Way to Output Text 25

Debugging a JSF Application 25

Summary 27

Chapter 2 Using Forms 29

Developing a Stock Quote Application 29

Getting the Stock Quote Symbol 29

Displaying the Result Page 36

Displaying the Stock Value 38

Marking Input As Required 40

Inputting a Date 49

Conversion Errors and Empty Input 55

Using a Combo Box 60

Using a Single b2 Bean 62

Hooking Up the Web Beans 63

Summary 66

Chapter 3 Validating Input 67

Developing a Postage Calculator 67

What If the Input Is Invalid? 73

Null Input and Validators 78

Validating the Patron Code 80

Creating a Custom Validator for the Patron Code 82

Displaying the Error Messages in Red 86

Displaying the Error Messages Along with the Field 87

Validating a Combination of Multiple Input Values 96

Summary 100

Chapter 4 Creating an E-shop 101

Listing the Products 102

Making the Link to Show the Details 106

Displaying Headers in the Columns 115

Implementing a Shopping Cart 116

Displaying the Content of the Shopping Cart 126

The Checkout Function 127

Getting the Credit Card Number of the Current User 131

Forcing the User to Log In 139

Implementing Logout 146

Protecting the Password 148

Summary 149

Chapter 5 Creating Custom Components 151

Displaying aCopyright Notice on Multiple Pages 151

Allowing the Caller to Specify the Company Name 157

Creating a Product Editor 159

Passing a Method in a Parameter? 162

Creating a Box Component 163

Accepting Two Pieces of XHTML Code 166

Creating a Reusable Component Library 168

Creating a Component Library Without taglib.xml 170

Summary 172

Chapter 6 Providing a Common Layout for Your Pages 173

Using the Same Menu on Different Pages 173

Using Global Navigation Rules 177

Using Two Abstract Parts 178

Creating Page-Specific Navigation Cases 180

Summary 182

Chapter 7 Building Interactive Pages with Ajax 183

Displaying a FAQ 183

Refreshing the Answer Only 185

Hiding and Showing the Answer 189

Using Ajax to Hide or Show the Answer 191

Giving a Rating to a Question 194

Updating the Rating as the User Types 199

Using a Dialog Box to Get the Rating 200

Setting the Look and Feel with Skins 204

Displaying Multiple Questions 206

Summary 212

Chapter 8 Using Conversations 215

Creating a Wizard to Submit Support Tickets 215

Interference Between Browser Windows 219

URL Mismatched? 225

Summary 229

Chapter 9 Supporting Other Languages 231

Displaying the Current Date and Time 231

Supporting Chinese 232

Easier Way to Access Map Elements 237

Internationalizing the Date Display 238

Letting the User Change the Language Used 238

Localizing the Full Stop 243

Displaying a Logo 246

Making the Locale Change Persistent 248

Localizing Validation Messages 250

Summary 251

Chapter 10 Using JBoss Seam 253

Installing Seam 253

Re-creating the E-shop Project 254

Allowing the User to Add Products 257

Restricting Access to the Product-Editing Page 265

Creating a Shopping Cart 267

Turning the Shopping Cart into a Stateful Session Bean 273

Creating the Checkout Page 277

Using WebLogic, WebSphere, or GlassFish 284

Summary 284

Index 287

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)