Javaserver Faces in Action

by
Format: Paperback
Pub. Date: 2004-11-01
Publisher(s): Manning Pubns Co
List Price: $49.95

Rent Book

Select for Price
There was a problem. Please try again later.

New Book

We're Sorry
Sold Out

Used Book

We're Sorry
Sold Out

eBook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

JavaServer Faces in Action is an introduction, a tutorial, and a handy reference. With the help of many examples, the book explains what JSF is, how it works, and how it relates to other frameworks and technologies like Struts, Servlets, Portlets, JSP, and JSTL. It provides detailed coverage of standard components, renderers, converters, and validators, and how to use them to create solid applications. This book will help you start building JSF solutions today.

Author Biography

Kito Mann is an enterprise architect who has developed applications with a wide variety of technologies on several different platforms. He has consulted with Fortune 500 clients, including Prudential Financial and J. P. Morgan Chase & Company, and was recently the chief architect of an educational application service provider. He is also the founder of JSFCentral.com, a site devoted to the JavaServer Faces community. He lives in Stamford, Connecticut.

Table of Contents

foreword xxi
preface xxiii
acknowledgments xxv
about this book xxvii
about the title and cover xxxiii
PART 1 EXPLORING JAVASERVER FACES 1(274)
1 IntroducingJavaServer Faces
3(35)
1.1 It's a RAD-ical world
4(6)
So, what is JavaServer Faces?
5(5)
Industry support
10(1)
1.2 The technology under the hood
10(6)
Hypertext Transfer Protocol (HTTP)
11(1)
Servlets
12(1)
Portlets
13(1)
JavaBeans
14(1)
JSP and other display technologies
15(1)
1.3 Frameworks, frameworks, frameworks
16(3)
Why do we need frameworks?
16(1)
She's a Model 2
17(1)
JSF, Struts, and other frameworks
18(1)
1.4 Components everywhere
19(3)
1.5 Hello, world!
22(15)
Dissecting hello jsp
24(7)
Dissecting goodbye.jsp
31(1)
Examining the HelloBean class
32(2)
Configuration with faces-config.xml
34(2)
Configuration with web.xml
36(1)
1.6 Summary
37(1)
2 JSF fundamentals
38(50)
2.1 The key pieces of the pie
39(18)
User interface components
41(2)
Renderers
43(1)
Validators
44(1)
Backing beans
45(3)
Converters
48(1)
Events and listeners
49(6)
Messages
55(1)
Navigation
56(1)
2.2 The Request Processing Lifecycle
57(12)
Phase 1: Restore View
61(2)
Phase 2: Apply Request Values
63(2)
Phase 3: Process Validations
65(1)
Phase 4: Update Model Values
66(1)
Phase 5: Invoke Application
66(2)
Phase 6: Render Response
68(1)
2.3 Understanding component and client identifiers
69(7)
Naming containers
72(1)
Referencing identifiers
73(3)
2.4 Exploring the JSF expression language
76(10)
Understanding scoped variables
80(1)
Using implicit variables
81(2)
Using the EL with components
83(3)
2.5 Summary
86(2)
3 Warming up: getting around JSF
88(49)
3.1 Setting up your JSF environment
89(13)
Basic requirements
89(1)
Choosing a JSF implementation
89(1)
Directory structure
90(2)
Configuration
92(10)
3.2 The role of JSP
102(8)
Using JSP includes
103(1)
Using JSF with JSTL and other JSP custom tags
104(6)
3.3 Creating and initializing beans
110(19)
Declaring managed beans
113(10)
Declaring Lists and Maps as managed beans
123(2)
Setting values with value-binding expressions
125(4)
3.4 Navigating the sea of pages
129(7)
3.5 Summary
136(1)
4 Getting started with the standard components
137(48)
4.1 It's all in the components
138(10)
Using HTML attributes
142(1)
Understanding facets
143(2)
The power of tools
145(3)
The render kit behind the scenes
148(1)
4.2 Common component properties
148(1)
4.3 Controlling the page with UIViewRoot
149(2)
4.4 Setting component parameters with UIParameter
151(2)
4.5 Displaying data with the Output components
153(14)
Displaying ordinary text with HtmlOutputText
153(14)
Using UIOutput with the [f:verbatim] tag
155 Creating input labels with HtmlOutputLabel
158 Using HtmlOutputFormat for parameterized text
160 Displaying hyperlinks with HtmlOutputLink
165
4.6 Displaying images with HtmlGraphicImage
167(2)
4.7 Displaying component messages with HtmlMessage
169(3)
4.8 Displaying application messages with HtmlMessages
172(4)
4.9 Grouping and layout with the Panel components
176(8)
Grouping components with HtmlPanelGroup
176(2)
Creating tables with HtmlPanelGrid
178(6)
4.10 Summary
184(1)
5 Using the input and data table components
185(49)
5.1 Registering event listeners
186(3)
Declaring value-change listeners
187(1)
Declaring action listeners
187(2)
5.2 Common component properties
189(1)
5.3 Handling forms with HtmlForm
190(2)
5.4 Handling basic user input
192(6)
Declaring basic text fields with HtmlInputText
193(1)
Using HtmlInputTextarea for memo fields
194(1)
Displaying password fields with HtmlInputSecret
195(2)
Declaring hidden fields with HtmlInputHidden
197(1)
5.5 Using HtmlSelectBooleanCheckbox for checkboxes
198(1)
5.6 Defining item lists
199(6)
Using UISelectltem for single items
200(3)
Using UISelectltems for multiple items
203(2)
5.7 Handling multiple-item selections
205(7)
Using HtmlSelectManyCheckbox for checkbox groups
205(3)
Displaying listboxes with HtmlSelectManyListbox
208(2)
Using HtmlSelectManyMenu for single-item listboxes
210(2)
5.8 Handling single-item selections
212(7)
Using HtmlSelectOneRadio for radio button groups
212(3)
Using single-select listboxes with HtmlSelectOneListbox
215(2)
Declaring combo boxes with HtmlSelectOneMenu
217(2)
5.9 Executing application commands
219(135)
Declaring buttons with HtmlCommandButton
219(2)
Creating an action link with HtmlCommandLink
221(2)
5.10 Displaying data sets with HtmlDataTable
223(10)
5.11 Summary
233(1)
6 Internationalization, validators, and converters
234(41)
6.1 Internationalization and localization
235(10)
Looking into locales
236(2)
Creating resource bundles
238(3)
Using resource bundles with components
241(3)
Internationalizing text from back-end code
244(1)
6.2 Input validation
245(6)
Using validator methods
245(1)
Using validators
246(1)
Using the standard validators
247(4)
Combining different validators
251(1)
6.3 Type conversion and formatting
251(18)
Using converters
254(1)
Working with the standard converters
255(14)
6.4 Customizing application messages
269(4)
6.5 Summary
273(2)
PART 2 BUILDING USER INTERFACES 275(132)
7 Introducing ProjectTrack
277(10)
7.1 Requirements
278(3)
7.2 The conceptual model
281(2)
7.3 User interface
283(1)
7.4 Development team
284(2)
7.5 Summary
286(1)
8 Developing a user interface without Java code: the Login page
287(29)
8.1 Getting started
289(2)
Setting up web.xml
289(1)
Setting up faces-config.xml
290(1)
8.2 Creating the Login page
291(9)
Starting with HtmlGraphicImage and HtmlOutputText components
292(3)
Adding a form
295(5)
8.3 Sprucing things up
300(4)
Using an image for the button
301(1)
Integrating with JavaScript
301(2)
Adding Cascading Style Sheets
303(1)
8.4 Adding validators
304(4)
Customizing validation messages
307(1)
8.5 Improving layout with HtmlPanelGrid
308(6)
8.6 Summary
314(2)
9 Developing a user interface without Java code: the other pages
316(38)
9.1 Building the header with a custom component
317(7)
Using a custom toolbar component
321(2)
Configuring the navigation rule
323(1)
9.2 Prototyping data tables with panels
324(7)
The Inbox page
325(4)
Configuring the navigation rule
329(1)
The Show All page
330(1)
Configuring the navigation rule
330(1)
9.3 Creating input forms
331(16)
The Approve a Project page
331(6)
Configuring the navigation rule
337(1)
The Reject a Project page
338(3)
Configuring the navigation rule
341(1)
The Create a Project page
341(6)
Configuring the navigation rule
347(1)
9.4 The Project Details page
347(6)
Configuring the navigation rule
351(2)
9.5 Summary
353(1)
10 Integrating application functionality
354(44)
10.1 Understanding JSF development approaches
355(2)
10.2 Exploring the application environment
357(3)
10.3 Reorganizing pages for security
360(1)
10.4 The Login page
360(5)
Updating the navigation rule
364(1)
10.5 The header
365(5)
Updating the navigation rule
369(1)
10.6 Integrating data grids
370(9)
The Inbox page
370(8)
The Show All page
378(1)
10.7 Integrating input forms
379(11)
Updating the includes
379(3)
The Approve a Project page
382(3)
The Reject a Project page
385(1)
The Create a Project page
386(4)
10.8 The Project Details page
390(6)
Updating the navigation rule
395(1)
10.9 Adding an error page
396(2)
Updating web.xnrl
397(1)
Updating the navigation rule
397(1)
10.10 Internationalizing and localizing the UI
398(6)
Externalizing text into the resource bundle
398(2)
Internationalizing the header
400(2)
Localizing for Russian
402(2)
10.11 Summary
404(3)
PART 3 DEVELOPING APPLICATIONS LOGIC 407(1)
11 The JSF environment
409(194)
11.1 From servlets to JSF
410(3)
11.2 The application foundation
413(6)
Application
413(4)
Evaluation expressions
417(2)
11.3 It's all in the context
419(9)
FacesContext
420(2)
FacesMessage
422(2)
ExternalContext
424(4)
11.4 Event handling
428(10)
FacesEvent
430(2)
Handling action events
432(2)
Handling value-change events
434(1)
Handling phase events
435(3)
11.5 Components revisited
438(17)
UIComponent
442(4)
UIViewRoot
446(3)
ValueHolder
449(2)
EditableValueHolder
451(2)
SelectItem and SelectItemGroup model beans
453(2)
11.6 Summary
455(1)
12 Building an application: design issues and foundation classes
456(1)
12.1 Layers of the pie
457(3)
12.2 Roasting the beans
460(13)
The importance of toString
461(1)
Serialization for breakfast
462(1)
Its all in the properties
462(10)
Exposing beans
472(1)
12.3 Exploring the business layer and data layers
473(3)
12.4 Developing the application layer
476(15)
Handling constants
478(2)
Organizing utility methods
480(2)
Initializing singletons
482(2)
Adapting business objects
484(7)
12.5 Writing a visit object for session state
491(3)
12.6 Developing a base backing bean class
494(4)
12.7 Summary
498(1)
13 Building an application: backing beans, security, and internationalization
499(1)
13.1 Writing backing beans
500(45)
Thread safety
501(1)
Handling errors
501(4)
Performing authentication
505(6)
Listing projects with UIData and parameterizing listeners
511(11)
Updating projects
522(6)
Creating new projects
528(6)
Paging through the project history with UIData
534(6)
Working with JDBC ResultSets and UIData
540(5)
13.2 Adding security
545(6)
Container-based vs. custom security
546(1)
Using custom security
547(4)
13.3 Supporting internationalization in code
551(11)
Internationalizing text with resource bundles
552(5)
Internationalizing messages
557(5)
13.4 Design consequences and alternatives
562(4)
Accessing the business layer
562(1)
Organizing beans by function
563(1)
Action methods implemented by backing beans
564(1)
Initializing backing bean properties with the Managed Bean Creation facility
565(1)
13.5 Summary
566(2)
14 Integrating JSF with Struts and existing applications
568(1)
14.1 What integration means
569(1)
14.2 When to use JSF with other frameworks
569(2)
14.3 The many faces of requests and responses
571(1)
14.4 Integrating JSF with Struts applications
572(28)
First steps
575(2)
Migrating Struts JSP tags
577(20)
Using JSF action methods and managed beans
597(2)
Who's controlling whom?
599(1)
14.5 Integrating JSF with non-Struts applications
600(1)
14.6 Summary
601(2)
PART 4 WRITING CUSTOM COMPONENTS, RENDERERS, VALIDATORS, AND CONVERTERS 603(1)
15 The JSF environment: a component developer's perspective
605(98)
15.1 Three steps to UI extension nirvana
606(1)
15.2 Developing UI components
607(29)
Deciding when to write a UI component
608(2)
Classes and interfaces
610(13)
Event handling with method bindings
623(1)
Registration
624(3)
JSP integration
627(9)
15.3 Developing renderers
636(12)
Deciding when to write a renderer
640(1)
Renderer
641(2)
RenderKit
643(1)
Registration
644(3)
JSP integration
647(1)
15.4 Developing validators
648(6)
Validator
649(1)
Registration
650(2)
JSP integration
652(2)
15.5 Developing converters
654(6)
Converter
654(3)
Registration
657(1)
JSP integration
658(2)
15.6 Handling internationalization
660(1)
15.7 Packaging UI extensions
660(1)
15.8 Summary
661(4)
appendix A: Using JSF without JSP
665(10)
references
675(4)
index
679(24)
ONLINE EXTENSION
PART 5 WRITING CUSTOM COMPONENTS, RENDERERS, VALIDATION, AND CONVERTERS: EXAMPLES 703(1)
16 UIInputDate: a simple input component
705
16.1 Writing the UIInputDate class
708(10)
Encoding
709(6)
Decoding
715(2)
Implementing StateHolder methods
717(1)
16.2 Registering the component
718(1)
16.3 JSP integration
718(6)
Writing the JSP custom tag
718(3)
Validating the tag
721(1)
Adding the tag to the tag library
722(2)
16.4 Using the component
724(2)
16.5 Summary
726(1)
17 RolloverButton renderer: a renderer with JavaScript support
727(2)
17.1 Writing the RolloverButtonRenderer class
729(8)
Encoding
731(4)
Decoding
735(1)
Registering the renderer
736(1)
17.2 JSP Integration
737(11)
Writing the HtmlBaseTag class
738(3)
Writing the JSP custom tag
741(3)
Validating the tag
744(1)
Adding the tag to the tag library
745(3)
17.3 Using the renderer
748(2)
17.4 Wrapping an existing renderer
750(4)
Developing the RolloverButtonDecoratorRenderer class
750(4)
17.5 Summary
754(2)
18 UIHeadlineViewer: a composite, data-aware component
756(2)
18.1 RSS and the Informa API
758(5)
18.2 Using UIData with Informa
763(2)
18.3 Subclassing DataModel
765(3)
18.4 Writing the UIHeadlineViewer class
768(12)
18.5 Registering the component
780(1)
18.6 JSP integration
781(8)
Writing the JSP custom tag
781(6)
Adding the tag to the tag library
787(2)
18.7 Using the component
789(4)
18.8 Summary
793(1)
19 UINavigator: a model-driven toolbar component
794(2)
19.1 Writing the model classes
796(5)
19.2 Writing the UINavigator class
801(9)
Implementing ActionSource methods
803(3)
Overriding UIComponentBase methods
806(1)
Implementing StateHolder methods
807(2)
Developing NavigatorActionListener: a custom ActionListener
809(1)
19.3 Registering the component
810(1)
19.4 Writing the ToolbarRenderer class
811(10)
Encoding
811(9)
Decoding
820(1)
19.5 Registering the renderer
821(1)
19.6 JSP integration
822(12)
Writing the Navigator_ToolbarTag component tag
822(4)
Writing the NavigatorItemTag tag handler
826(5)
Adding the tags to the tag library
831(3)
19.7 Using the component
834(4)
19.8 Summary
838(1)
20 Validator and converter examples
839(1)
20.1 Validator methods vs. validator classes
840(1)
20.2 Developing a validator
840(14)
Writing the RegularExpressionValidator class
842(5)
Registering the validator
847(1)
Integrating with JSP
847(5)
Using the validator
852(2)
20.3 When custom converters are necessary
854(1)
20.4 Developing a converter
854(18)
Writing the UserConverter class
856(9)
Registering the converter
865(5)
JSP integration 866 Using the converter
870(2)
20.5 Summary
872(1)
appendix B: A survey of JSF IDEs and implementations
873(62)
appendix C: Extending the core JSF classes
935(23)
appendix D: JSF configuration
958(18)
appendix E: Time zone, country, language, and currency codes
976

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.