I was completely new to Java Server Faces before reading this book. It was an OK book, but I think the author could have done a better job explaining the topics. They do a lot of referencing you to forward chapters in the book which I thought was confusing. The examples skipped from really easy trivial stuff, to very difficult hard to fallow examples with nothing in between. I also disliked how the authors spend so much time making everything locale independent. Every example in the book is locale independent which makes it harder to follow. It would have been sufficient to have one chapter or section on the topic, and for the other examples not worry about it. I've since read some other books that discuss java server faces, and found them to be much more helpful.
Author(s): David Geary, Cay S. Horstmann
Series: Sun Core Series
Edition: 3rd ed
Publisher: Prentice Hall
Year: 2010
Language: English
Pages: 658
City: Upper Saddle River, NJ
Contents......Page 7
Preface......Page 17
Acknowledgments......Page 21
1 GETTING STARTED......Page 24
Why JavaServer Faces?......Page 25
A Simple Example......Page 26
Ingredients......Page 29
Directory Structure......Page 30
Building a JSF Application......Page 31
Deploying a JSF Application......Page 33
Development Environments for JSF......Page 35
An Analysis of the Sample Application......Page 37
Beans......Page 38
JSF Pages......Page 39
Servlet Configuration......Page 41
A First Glimpse of Ajax: JSF 2.0......Page 43
JSF Framework Services......Page 46
Behind the Scenes......Page 48
Rendering Pages......Page 49
Decoding Requests......Page 50
The Life Cycle......Page 51
Conclusion......Page 53
2 MANAGED BEANS......Page 54
Definition of a Bean......Page 55
Bean Properties......Page 58
Value Expressions......Page 59
Backing Beans......Page 60
CDI Beans: CDI......Page 61
Message Bundles......Page 62
Messages with Variable Parts......Page 64
Setting the Application Locale......Page 65
A Sample Application......Page 67
Bean Scopes......Page 73
Session Scope......Page 74
Request Scope......Page 75
Conversation Scope: CDI......Page 76
View Scope: JSF 2.0......Page 77
Injecting CDI Beans: CDI......Page 78
Injecting Managed Beans: JSF 2.0......Page 79
Configuring Managed Beans with XML......Page 80
Lvalue and Rvalue Modes......Page 85
Using Brackets......Page 86
Map and List Expressions......Page 87
Calling Methods and Functions: JSF 2.0......Page 88
Resolving the Initial Term......Page 89
Composite Expressions......Page 91
Method Expressions......Page 92
Conclusion......Page 93
3 NAVIGATION......Page 94
Static Navigation......Page 95
Dynamic Navigation......Page 96
Mapping Outcomes to View IDs......Page 97
The JavaQuiz Application......Page 99
Redirection......Page 108
Redirection and the Flash: JSF 2.0......Page 109
RESTful Navigation and Bookmarkable URLs: JSF 2.0......Page 110
View Parameters......Page 111
GET Request Links......Page 112
Specifying Request Parameters......Page 113
Adding Bookmarkable Links to the Quiz Application......Page 114
Advanced Navigation Rules......Page 118
Wildcards......Page 119
Using from-action......Page 120
Conclusion......Page 121
4 STANDARD JSF TAGS......Page 122
An Overview of the JSF Core Tags......Page 124
Attributes, Parameters, and Facets......Page 126
An Overview of the JSF HTML Tags......Page 127
Common Attributes......Page 129
Panels......Page 137
The Head, Body, and Form Tags......Page 140
Form Elements and JavaScript......Page 142
Text Fields and Text Areas......Page 145
Using Text Fields and Text Areas......Page 149
Displaying Text and Images......Page 153
Buttons and Links......Page 156
Using Buttons......Page 158
Using Command Links......Page 163
Selection Tags......Page 167
Checkboxes and Radio Buttons......Page 170
Menus and Listboxes......Page 173
Items......Page 175
Messages......Page 193
Conclusion......Page 199
5 FACELETS: JSF 2.0......Page 200
Facelets Tags......Page 201
Templating with Facelets......Page 203
Building Pages from Common Templates......Page 205
Organizing Your Views......Page 209
Decorators......Page 215
Custom Tags......Page 217
......Page 220
......Page 222
Conclusion......Page 224
6 DATA TABLES......Page 226
The Data Table Tag—h:dataTable......Page 227
A Simple Table......Page 229
h:dataTable Attributes......Page 232
h:column Attributes......Page 233
Headers, Footers, and Captions......Page 234
Styles by Column......Page 237
Styles by Row......Page 238
The ui:repeat Tag: JSF 2.0......Page 239
JSF Components in Tables......Page 240
Editing Table Cells......Page 244
Deleting Rows: JSF 2.0......Page 247
Database Tables......Page 250
Table Models......Page 254
Rendering Row Numbers......Page 255
Sorting and Filtering......Page 256
Scrolling with a Scrollbar......Page 264
Scrolling with Pager Widgets......Page 265
Conclusion......Page 266
7 CONVERSION AND VALIDATION......Page 268
Overview of the Conversion and Validation Process......Page 269
Conversion of Numbers and Dates......Page 271
Conversion Errors......Page 275
A Complete Converter Example......Page 281
Validating String Lengths and Numeric Ranges......Page 284
Checking for Required Values......Page 286
Displaying Validation Errors......Page 287
Bypassing Validation......Page 288
A Complete Validation Example......Page 289
Bean Validation: JSF 2.0......Page 292
Implementing Custom Converter Classes......Page 297
Specifying Converters: JSF 2.0......Page 301
Reporting Conversion Errors......Page 302
Getting Error Messages from Resource Bundles......Page 303
The Custom Converter Sample Application......Page 308
Supplying Attributes to Converters......Page 311
Registering Custom Validators......Page 312
Validating with Bean Methods......Page 316
Validating Relationships between Multiple Components......Page 317
Implementing Custom Converter and Validator Tags......Page 319
Conclusion......Page 325
8 EVENT HANDLING......Page 326
Events and the JSF Life Cycle......Page 328
Value Change Events......Page 329
Action Events......Page 334
The f:actionListener and f:valueChangeListener Tags......Page 340
Immediate Components......Page 342
Using Immediate Input Components......Page 343
Using Immediate Command Components......Page 345
Passing Data from the UI to the Server......Page 346
The f:param Tag......Page 347
The f:attribute Tag......Page 348
The f:setPropertyActionListener Tag......Page 349
Phase Events......Page 350
System Events: JSF 2.0......Page 351
Multi-Component Validation......Page 353
Making Decisions before Rendering the View......Page 355
Putting It All Together......Page 360
Conclusion......Page 367
9 COMPOSITE COMPONENTS: JSF 2.0......Page 368
The Composite Tag Library......Page 370
Using Composite Components......Page 372
Implementing Composite Components......Page 374
Configuring Composite Components......Page 375
Attribute Types......Page 376
Required Attributes and Default Attribute Values......Page 377
Manipulating Server-Side Data......Page 378
Localizing Composite Components......Page 381
Exposing a Composite's Components......Page 382
Exposing Action Sources......Page 385
Facets......Page 387
Children......Page 388
JavaScript......Page 390
Backing Components......Page 395
Packaging Composite Components in JARs......Page 404
Conclusion......Page 405
10 AJAX: JSF 2.0......Page 406
Ajax and JSF......Page 408
The JSF Life Cycle and Ajax......Page 409
The JSF Ajax Recipe......Page 410
The f:ajax Tag......Page 411
Ajax Groups......Page 414
Ajax Field Validation......Page 416
Ajax Request Monitoring......Page 418
JavaScript Namespaces......Page 420
Ajax Responses......Page 422
The JSF 2.0 JavaScript Library......Page 425
Passing Additional Ajax Request Parameters......Page 427
Queueing Events......Page 429
Coalescing Events......Page 430
Using Ajax in Composite Components......Page 431
Conclusion......Page 438
11 CUSTOM COMPONENTS, CONVERTERS, AND VALIDATORS......Page 440
Implementing a Component Class......Page 442
Encoding: Generating Markup......Page 446
Decoding: Processing Request Values......Page 449
The Tag Library Descriptor: JSF 2.0......Page 455
Using an External Renderer......Page 460
Processing Tag Attributes: JSF 2.0......Page 463
Supporting Value Change Listeners......Page 464
Supporting Method Expressions......Page 465
The Sample Application......Page 467
Encoding JavaScript......Page 475
Using Child Components and Facets......Page 479
Processing SelectItem Children......Page 482
Processing Facets......Page 483
Using Hidden Fields......Page 484
Saving and Restoring State......Page 490
Partial State Saving: JSF 2.0......Page 491
Building Ajax Components: JSF 2.0......Page 495
Implementing Self-Contained Ajax in Custom Components......Page 497
Supporting f:ajax in Custom Components......Page 501
Conclusion......Page 506
12 EXTERNAL SERVICES......Page 508
Issuing SQL Statements......Page 509
Connection Management......Page 511
Plugging Connection Leaks......Page 512
Using Prepared Statements......Page 513
Using the Derby Database......Page 515
Accessing a Container-Managed Resource......Page 517
Configuring a Database Resource in GlassFish......Page 518
Configuring a Database Resource in Tomcat......Page 520
A Complete Database Example......Page 521
A Crash Course in JPA......Page 529
Using JPA in a Web Application......Page 530
Using Managed Beans and Stateless Session Beans......Page 535
Stateful Session Beans: CDI......Page 539
Container-Managed Authentication and Authorization......Page 541
Sending Mail......Page 554
Using Web Services......Page 559
Conclusion......Page 566
13 HOW DO I ... ?......Page 568
How do I find more components?......Page 569
How do I support file uploads?......Page 570
How do I show an image map?......Page 579
How do I produce binary data in a JSF page?......Page 581
How do I show a large data set, one page at a time?......Page 590
How do I generate a pop-up window?......Page 595
How do I selectively show and hide parts of a page?......Page 603
How do I customize error pages?......Page 604
How do I write my own client-side validation tag?......Page 610
How do I configure my application?......Page 617
How do I extend the JSF expression language?......Page 618
How do I add a function to the JSF expression language?: JSF 2.0......Page 621
How do I monitor the traffic between the browser and the server?......Page 623
How do I debug a stuck page?......Page 624
How do I use testing tools when developing a JSF application?......Page 626
How do I use Scala with JSF?......Page 627
How do I use Groovy with JSF?......Page 629
Conclusion......Page 630
A......Page 631
B......Page 633
C......Page 634
D......Page 637
E......Page 638
F......Page 639
H......Page 641
I......Page 643
J......Page 645
L......Page 646
M......Page 647
N......Page 648
P......Page 649
R......Page 651
S......Page 652
T......Page 654
U......Page 655
V......Page 656
W......Page 657
X......Page 658