Core JavaServer Faces

Paperback
from $0.00

Author: David Geary

ISBN-10: 0137012896

ISBN-13: 9780137012893

Category: Web Programming / Development

JavaServer Faces (JSF) is the standard Java EE technology for building web user interfaces. It provides a powerful framework for developing server-side applications, allowing you to cleanly separate visual presentation and application logic. JSF 2.0 is a major upgrade, which not only adds many useful features but also greatly simplifies the programming model by using annotations and “convention over configuration” for common tasks.\ To help you quickly tap into the power of JSF 2.0, the third...

Search in google:

JavaServer Faces (JSF) is the standard Java EE technology for building web user interfaces. It provides a powerful framework for developing server-side applications, allowing you to cleanly separate visual presentation and application logic. JSF 2.0 is a major upgrade, which not only adds many useful features but also greatly simplifies the programming model by using annotations and “convention over configuration” for common tasks.To help you quickly tap into the power of JSF 2.0, the third edition of Core JavaServer™ Faces has been completely updated to make optimum use of all the new features. The book includes Three totally new chapters on using Facelets tags for templating, building composite components, and developing Ajax applications Guidance on building robust applications with minimal hand coding and maximum productivity–without requiring any knowledge of servlets or other low-level “plumbing” A complete explanation of the basic building blocks–from using standard JSF tags, to working with data tables, and converting and validating input Coverage of advanced tasks, such as event handling, extending the JSF framework, and connecting to external services Solutions to a variety of common challenges, including notes on debugging and troubleshooting, in addition to implementation details and working code for features that are missing from JSF Proven solutions, hints, tips, and “how-tos” show you how to use JSF effectively in your development projectsCore JavaServer™ Faces, Third Edition, provides everything you need to master the powerful and time-saving features of JSF 2.0 and is the perfect guide for programmers developing Java EE 6 web apps on Glassfish or another Java EE 6-compliant application servers, as well as servlet runners such as Tomcat 6.

Preface xvAcknowledgments xixChapter 1: Getting Started 2Why JavaServer Faces? 3A Simple Example 4Development Environments for JSF 13An Analysis of the Sample Application 15A First Glimpse of Ajax [JSF 2.0 Topic] 21JSF Framework Services 24Behind the Scenes 26Conclusion 31Chapter 2: Managed Beans 32Definition of a Bean 33CDI Beans [CDI Topic] 39Message Bundles 40A Sample Application 45Bean Scopes 51Configuring Beans 56The Expression Language Syntax 63Conclusion 71Chapter 3: Navigation 72Static Navigation 73Dynamic Navigation 74Redirection 86RESTful Navigation and Bookmarkable URLs [JSF 2.0 Topic] 88Advanced Navigation Rules 96Conclusion 99Chapter 4: Standard JSF Tags100An Overview of the JSF Core Tags 102An Overview of the JSF HTML Tags 105Panels 115The Head, Body, and Form Tags 118Text Fields and Text Areas 123Buttons and Links 134Selection Tags 145Messages 171Conclusion 177Chapter 5: Facelets [JSF 2.0 Topic] 178Facelets Tags 179Templating with Facelets 181Custom Tags 195Loose Ends 198Conclusion 202Chapter 6: Data Tables 204The Data Table Tag–h:dataTable 205A Simple Table 207Headers, Footers, and Captions 212Styles 215JSF Components in Tables 218Editing Tables 2Database Tables 228Table ModelsScrolling Techniques 242Conclusion 244Chapter 7: Conversion and Validation 246Overview of the Conversion and Validation Process 247Using Standard Converters 249Using Standard Validators 262Bean Validation [JSF 2.0 Topic] 270Programming with Custom Converters and Validators 275Implementing Custom Converter and Validator Tags 297Conclusion 303Chapter 8: Event Handling 304Events and the JSF Life Cycle 306Value Change Events 307Action Events 312Event Listener Tags 318Immediate Components 320Passing Data from the UI to the Server 324Phase Events 328System Events [JSF 2.0 Topic] 329Putting It All Together 338Conclusion 345Chapter 9: Composite Components [JSF 2.0 Topic] 346The Composite Tag Library 348Using Composite Components 350Implementing Composite Components 352Configuring Composite Components 353Attribute Types 354Required Attributes and Default Attribute Values 355Manipulating Server-Side Data 356Localizing Composite Components 359Exposing a Composite’s Components 360Facets 365Children 366JavaScript 368Backing Components 373Packaging Composite Components in JARs 382Conclusion 383Chapter 10: Ajax [JSF 2.0] 384Ajax and JSF 386The JSF Life Cycle and Ajax 387The JSF Ajax Recipe 388The f:ajax Tag 389Ajax Groups 392Ajax Field Validation 394Ajax Request Monitoring 396JavaScript Namespaces 398Handling Ajax Errors 400Ajax Responses 400The JSF 2.0 JavaScript Library 403Passing Additional Ajax Request Parameters 405Queueing Events 407Coalescing Events 408Intercepting jsf.ajax.request() 409Using Ajax in Composite Components 409Conclusion 416Chapter 11: Custom Components, Converters, and Validators 418Implementing a Component Class 420Encoding: Generating Markup 424Decoding: Processing Request Values 427The Tag Library Descriptor [JSF 2.0 Topic] 433Using an External Renderer 438Processing Tag Attributes [JSF 2.0 Topic] 441Encoding JavaScript 453Using Child Components and Facets 457Saving and Restoring State 468Building Ajax Components [JSF 2.0 Topic] 473Implementing Self-Contained Ajax inCustom Components 475Conclusion 484Chapter 12: External Services 486Database Access with JDBC 487Configuring a Data Source 495Using the Java Persistence Architecture 507Container-Managed Authentication and Authorization 519Sending Mail 532Using Web Services 537Conclusion 544Chapter 13: How Do I . . . ? 546How do I find more components? 547How do I support file uploads? 548How do I show an image map? 557How do I produce binary data in a JSF page? 559How do I show a large data set, one page at a time? 568How do I generate a pop-up window? 573How do I selectively show and hide parts of a page? 581How do I customize error pages? 582How do I write my own client-side validation tag? 588How do I configure my application? 595How do I extend the JSF expression language? 596How do I add a function to the JSF expression language? [JSF 2.0 Topic] 599How do I monitor the traffic between the browser and the server? 601How do I debug a stuck page? 602How do I use testing tools when developing a JSF application? 604How do I use Scala with JSF? 605How do I use Groovy with JSF? 607Conclusion 608Index 609