Core JavaServer(TM) Faces (2nd Edition)

3.4 avg rating
( 94 ratings by GoodReads )
 
9780131738867: Core JavaServer(TM) Faces (2nd Edition)

JavaServer Faces (JSF) is quickly emerging as the leading solution for rapid user interface development in Java-based server-side applications. Now, Core JavaServer™ Faces–the #1 guide to JSF–has been thoroughly updated in this second edition, covering the latest feature enhancements, the powerful Ajax development techniques, and open source innovations that make JSF even more valuable.

Authors David Geary and Cay Horstmann delve into all facets of JSF 1.2 development, offering systematic best practices for building robust applications, minimizing handcoding, and maximizing productivity. Drawing on unsurpassed insider knowledge of the Java platform, they present solutions, hints, tips, and “how-tos” for writing superior JSF 1.2 production code, even if you’re new to JSF, JavaServer Pages™, or servlets.

The second edition’s extensive new coverage includes: JSF 1.2’s improved alignment with the broader Java EE 5 platform; enhancements to the JSF APIs; controlling Web flow with Shale; and using Facelets to replace JSP with XHTML markup. The authors also introduce Ajax development with JSF–from real-time validation and Direct Web Remoting to wrapping Ajax in JSF components and using the popular Ajax4jsf framework.

This book will help you

  • Automate low-level details and eliminate unnecessary complexity in server-side development
  • Discover JSF best practices, ranging from effective UI design and style sheets to internationalization
  • Use JSF with Tiles to build consistent, reusable user interfaces
  • Leverage external services such as databases, LDAP directories, authentication/authorization, and Web services
  • Use JBoss Seam to greatly simplify development of database-backed applications
  • Implement custom components, converters, and validators
  • Master the JSF 1.2 tag libararies, and extend JSF with additional tag libraries

Preface
Acknowledgments

Chapter 1: Getting Started
Chapter 2: Managed Beans
Chapter 3: Navigation
Chapter 4: Standard JSF Tags
Chapter 5: Data Tables
Chapter 6: Conversion and Validation
Chapter 7: Event Handling
Chapter 8: Subviews and Tiles
Chapter 9: Custom Components, Converters, and Validators
Chapter 10: External Services
Chapter 11: Ajax
Chapter 12: Open Source
Chapter 13: How Do I . . .
Index 

"synopsis" may belong to another edition of this title.

About the Author:

David Geary, who worked at Sun Microsystems from 1994 through 1997, was a member of the JSF 1.0 Expert Group. He is president of Clarity Training Inc., a training and consulting company focusing on server-side Java technology, and is the author of eight books on Java technology, including the best-selling Graphic Java™ 2 series, Advanced JavaServer Pages, and Google™ Web Toolkit Solutions (all from Prentice Hall). David was also a member of the JSTL Expert Group, was the Second Apache Struts committer, and wrote questions for Sun's Web Developer Certification Exam. David is a regular speaker on the popular No Fluff Just Stuff tour and is a JavaOne Rock Star, by virtue of his Shale Presentation with Craig McClanahan in 2005.

Cay S. Horstmann is a professor of computer science at San Jose State University. He has served as vice president and chief technology officer of Preview Systems Inc., and as a consultant on C++, Java, and Internet programming for major corporations, universities, and organizations. Cay is also the author of the classic Core Java™ books.

Excerpt. © Reprinted by permission. All rights reserved.:

When we heard about JavaServer Faces (JSF) at the 2002 JavaOne conference, we were very excited. Both of us had extensive experience with client-side Java programming, and had lived to tell the tale—David in Graphic Java™, and Cay in Core Java™, both published by Sun Microsystems Press. When we first tried web programming with servlets and JavaServer Pages (JSP), we found it to be rather unintuitive and tedious. JavaServer Faces promised to put a friendly face in front of a web application, allowing programmers to think about text fields and menus instead of fretting over page flips and request parameters. Each of us proposed a book project to the publisher, who promptly suggested that we should jointly write the Sun Microsystems Press book on this technology.

It took the JSF Expert Group (of which David was a member) until 2004 to release the JSF 1.0 specification and reference implementation. A bug fix 1.1 release emerged shortly afterwards, and an incremental 1.2 release added a number of cleanups and convenience features in 2006.

JSF is now the preeminent server-side Java web framework, and it has fulfilled most of its promises. You really can design web user interfaces by putting components on a form and linking them to Java objects, without having to mix code and markup. A strong point of JSF is its extensible component model, and a large number of third-party components have become available. The flexible design of the framework has allowed it to grow well and accommodate new technologies such as Ajax. The framework was designed for tool support, and usable drag-and-drop GUI builders have finally emerged. And finally, unlike competing technologies that let you tumble down a deep cliff once you step beyond the glitz, JSF supports the hard stuff—separation of presentation and business logic, navigation, connections with external services, and configuration management.

We are still excited about JSF, and we hope you will share this excitement when you learn how this technology makes you a more effective web application developer.

About This Book

This book is suitable for web developers whose main focus is user interface design, as well as for programmers who implement reusable components for web applications. This is in stark contrast to the official JSF specification, a dense and pompously worded document whose principal audience is framework implementors, as well as long-suffering book authors.

The first half of the book, extending through Chapter 6, focuses on the JSF tags. These tags are similar to HTML form tags. They are the basic building blocks for JSF user interfaces. No programming is required for use of the tags. We assume only basic HTML skills for web pages and standard Java programming for the business logic.

The first part of the book covers these topics:

  • Setting up your programming environment (Chapter 1)
  • Connecting JSF tags to application logic (Chapter 2)
  • Navigating between pages (Chapter 3)
  • Using the standard JSF tags (Chapters 4 and 5)
  • Converting and validating input (Chapter 6)

Starting with Chapter 7, we begin JSF programming in earnest. You will learn how to perform advanced tasks, and how to extend the JSF framework. Here are the main topics of the second part:

  • Event handling (Chapter 7)
  • Including common content among multiple pages (Chapter 8)
  • Implementing custom components, converters, and validators
  • (Chapter 9)
  • Connecting to databases and other external services (Chapter 10)
  • Ajax (Chapter 11)
  • Open source technologies, with a focus on Facelets, Seam, and Shale (Chapter 12)

We end the book with a chapter that aims to answer common questions of the form “How do I . . . ” (see Chapter 13). We encourage you to have a peek at that chapter as soon as you become comfortable with the basics of JSF. There are helpful notes on debugging and logging, and we also give you implementation details and working code for features that are missing from JSF, such as file uploads, pop-up menus, and a pager component for long tables.

JSF is built on top of servlets and JSP, but from the point of view of the JSF developer, these technologies merely form the low-level plumbing. While it can’t hurt to be familiar with other web technologies such as servlets, JSP, or Struts, we do not assume any such knowledge.

Required Software

All software that you need for this book is freely available. You need the Java Software Development Kit from Sun Microsystems and an application server that supports JSF, such as the excellent open source GlassFish project. The software runs identically on Linux, Mac OS X, Solaris, and Windows. We used Java 5 and GlassFish on both Linux and Mac OS X to develop the code examples in the book.

If you are looking for a development environment that supports JSF development, we can heartily recommend the freely available NetBeans IDE. Good JSF support for Eclipse is available from several vendors that sell Eclipse enhancements.

Web Support

The web page for this book is http://corejsf.com. It contains

  • The source code for all examples in this book
  • Useful reference material that we felt is more effective in browseable form than in print
  • A list of known errors in the book and the code
  • A form for submitting corrections and suggestions

"About this title" may belong to another edition of this title.

Top Search Results from the AbeBooks Marketplace

1.

Geary, David; Horstmann, Cay S.
Published by Prentice Hall (2007)
ISBN 10: 0131738860 ISBN 13: 9780131738867
New Paperback Quantity Available: 3
Seller
Murray Media
(North Miami Beach, FL, U.S.A.)
Rating
[?]

Book Description Prentice Hall, 2007. Paperback. Book Condition: New. Bookseller Inventory # P110131738860

More Information About This Seller | Ask Bookseller a Question

Buy New
US$ 52.11
Convert Currency

Add to Basket

Shipping: US$ 2.99
Within U.S.A.
Destination, Rates & Speeds

2.

Geary, David; Horstmann, Cay S.
Published by Prentice Hall
ISBN 10: 0131738860 ISBN 13: 9780131738867
New PAPERBACK Quantity Available: 1
Seller
Cloud 9 Books
(West Palm Beach, FL, U.S.A.)
Rating
[?]

Book Description Prentice Hall. PAPERBACK. Book Condition: New. 0131738860 New Condition. Bookseller Inventory # NEW6.0048506

More Information About This Seller | Ask Bookseller a Question

Buy New
US$ 59.99
Convert Currency

Add to Basket

Shipping: US$ 4.99
Within U.S.A.
Destination, Rates & Speeds

3.

Geary, David; Horstmann, Cay S.
Published by Prentice Hall (2007)
ISBN 10: 0131738860 ISBN 13: 9780131738867
New Paperback Quantity Available: 1
Seller
Ergodebooks
(RICHMOND, TX, U.S.A.)
Rating
[?]

Book Description Prentice Hall, 2007. Paperback. Book Condition: New. 2. Bookseller Inventory # DADAX0131738860

More Information About This Seller | Ask Bookseller a Question

Buy New
US$ 61.20
Convert Currency

Add to Basket

Shipping: US$ 3.99
Within U.S.A.
Destination, Rates & Speeds

4.

Geary, David; Horstmann, Cay S.
Published by Prentice Hall (2007)
ISBN 10: 0131738860 ISBN 13: 9780131738867
New Paperback Quantity Available: 1
Seller
Irish Booksellers
(Rumford, ME, U.S.A.)
Rating
[?]

Book Description Prentice Hall, 2007. Paperback. Book Condition: New. book. Bookseller Inventory # 0131738860

More Information About This Seller | Ask Bookseller a Question

Buy New
US$ 78.27
Convert Currency

Add to Basket

Shipping: FREE
Within U.S.A.
Destination, Rates & Speeds

5.

Geary, David; Horstmann, Cay S.
Published by Prentice Hall (2007)
ISBN 10: 0131738860 ISBN 13: 9780131738867
New Softcover Quantity Available: 1
Seller
Book Deals
(Lewiston, NY, U.S.A.)
Rating
[?]

Book Description Prentice Hall, 2007. Book Condition: New. Brand New, Unread Copy in Perfect Condition. A+ Customer Service! Summary: Preface xvAcknowledgments xixChapter 1: Getting Started 2Why JavaServer Faces? 3Software Installation 4A Simple Example 6Sample Application Analysis 12Development Environments for JSF 21JSF Framework Services 28Behind the Scenes 30 Chapter 2: Managed Beans 36Definition of a Bean 37Message Bundles 42A Sample Application 46Backing Beans 53Bean Scopes 54Configuring Beans 57The Syntax of Value Expressions 64 Chapter 3: Navigation 70Static Navigation 71Dynamic Navigation 73Advanced Navigation Issues 84 Chapter 4: Standard JSF Tags 90An Overview of the JSF Core Tags 92An Overview of the JSF HTML Tags 94Forms 103Text Fields and Text Areas 108Buttons and Links 119Selection Tags 130Messages 157Panels 163 Chapter 5: Data Tables 170The Data Table Tag h:dataTable 171A Simple Table 173Headers, Footers, and Captions 178JSF Components 182Editing Table Cells 186Styles 189Database Tables 191Table Models 197Scrolling Techniques 214 Chapter 6: Conversion and Validation 218Overview of the Conversion and Validation Process 219Using Standard Converters 221Using Standard Validators 233Programming with Custom Converters and Validators 240 Chapter 7: Event Handling 266Life Cycle Events 268Value Change Events 269Action Events 275Event Listener Tags 285Immediate Components 287Passing Data from the UI to the Server 291Phase Events 295Putting It All Together 303 Chapter 8: Subviews and Tiles 314Common Layouts 315A Book Viewer and a Library 316The Book Viewer 318Content Inclusion in the Book Viewer 328The Library 339 Chapter 9: Custom Components, Converters, and Validators 354Classes for Implementing Custom Components 356Encoding: Generating Markup 362Decoding: Processing Request Values 366Implementing Custom Component Tags 372Revisiting the Spinner 387Encoding JavaScript to Avoid Server Roundtrips 404Using Child Components and Facets 408Implementing Custom Converters and Validators 432 Chapter 10: External Services 450Database Access with JDBC 451Configuring a Data Source 457An Introduction to LDAP 473Managing Configuration Information 483Container-Managed Authentication and Authorization 505Using Web Services 516 Chapter 11: Ajax 528Ajax Fundamentals 530JavaScript Libraries 533Form Completion 534Realtime Validation 537Propagating Client-Side View State 542Direct Web Remoting 543Ajax Components 546Ajax4jsf 554 Chapter 12: Open Source 570Web Flow Shale 572Alternate View Technologies Facelets 585EJB Integration Seam 596 Chapter 13: How Do I . . . 610Web User Interface Design 611Validation 658Programming 669Debugging and Logging 684 Index 699. Bookseller Inventory # ABE_book_new_0131738860

More Information About This Seller | Ask Bookseller a Question

Buy New
US$ 142.13
Convert Currency

Add to Basket

Shipping: FREE
Within U.S.A.
Destination, Rates & Speeds

6.

Geary, David; Horstmann, Cay S.
ISBN 10: 0131738860 ISBN 13: 9780131738867
New Quantity Available: 1
Seller
Castle Rock
(Pittsford, NY, U.S.A.)
Rating
[?]

Book Description Book Condition: Brand New. Book Condition: Brand New. Bookseller Inventory # 97801317388671.0

More Information About This Seller | Ask Bookseller a Question

Buy New
US$ 138.16
Convert Currency

Add to Basket

Shipping: US$ 3.99
Within U.S.A.
Destination, Rates & Speeds