Course Summary
A comprehensive introduction to frameworks compliant with the JavaServer Faces specification (JSR-127 and JSR-314), with an emphasis on the Apache MyFaces implementation. Covers framework fundamentals while giving a thorough conceptual understanding of framework behavior and design patterns, plus a comprehensive grounding in best practices. Explores major pitfalls of JSF and shows how to work around them. Includes coverage of popular implementations and component libraries such as ICEFaces, Facelets, Ajax4JSF, ADFFaces, and Seam.
During lab exercises, attendees build a non-trivial JSF application that incorporates key features common to many web applications, including list management, working with editable forms, type coercion, formatting, validation, and error messaging.
This course also provides in-depth coverage of pragmatic testing issues and strategies.
Duration
5 days.
Audience
Java developers who are new to JSF (JavaServer Faces), or who desire a more thorough understanding of the framework.
Java Programming or equivalent. A basic understanding of Servlets and JSP is also helpful, but not required.
Additional Notes
For additional information on JSF, please visit:
Sun Microsystems JavaServer Faces Technology page: http://java.sun.com/javaee/javaserverfaces/
JSF Central: http://www.jsfcentral.com/
The Apache MyFaces project website: http://myfaces.apache.org/
Wikipedia entry on JavaServer Faces: http://en.wikipedia.org/wiki/JavaServer_Faces
Outline
- What is JSF?
- Servlets and JSP
- The Model-View-Controller Paradigm
- Action vs. Component Frameworks
- Comparison with Struts
- Comparison with other component frameworks
- The Java Community Process
- JavaServer Faces Specifications
- Motivation
- History
- JSR-127
- JSR-252 enhancements
- JavaServer Faces 2.0 (JSR-314)
- Features of JSF
- What JSF Does
- What JSF Doesn't Do
- JSF 1.x vs. JSF 2.x
- JSF Architecture Overview
- The FrontController Pattern
- FacesServlet
- Life cycle phases
- JSF Components
- The component tree
- Built-in components
- Coarse grained components
- Type Coercion, Formatting, and Validation
- Component Renderers
- Converters
- Validators
- Managing Navigational Flow
- Action methods
- XML configuration
- Managed bean instantiation
- The FrontController Pattern
- JSF Application Basics
- Project Setup
- JAR dependencies, DTDs, and TLDs
- Setting up a dynamic web project in Eclipse
- Configuration Basics
- web.xml
- faces-config.xml
- Configuring managed beans
- Configuring navigation
- Configuring project resources
- JSP Tags
- Binding Java properties
- Component Ids
- Working with JSTL and EL
- JSTL gotchas
- UI Component Basics
- The UI Component Model
- UIComponent base class
- Deploying a JSF Application
- Build tools (ANT vs. Maven)
- App server configuration
- Libraries and TLDs
- WAR deployment
- Exploded deployment
- Troubleshooting Deployments
- Missing JAR files
- DTDs and internet connections
- web.xml issues
- faces-config issues
- Project Setup
- The Faces Lifecycle
- Faces Requests and Non-Faces Requests
- The Faces Context
- Accessing the Context
- Accesing the External Context
- The Component Tree
- Lifecycle Phases
- Restore View
- Apply Request Values
- Process Validations
- Update Model Values
- Invoke Application
- Render Response
- Events and Listeners
- Customizing the Lifecycle
- UI Components
- The UIComponent Model
- Components and Renderers
- Registering and Removing Children
- Using Components
- The View
- Subviews
- Value Binding
- Converting between Model Properties and UI Strings
- Processing Submitted Form Values
- JSP Tags
- Faces Tags
- Working with JSTL and EL
- JSTL Gotchas
- Validators
- Configuring Event Listeners
- Working with Tables
- Using Facets
- Working with dataTable
- Using a panelGrid
- The UIComponent Model
- Navigation, Actions, and Listeners
- Actions and Navigation
- Implementing Application Actions
- Specifying Navigation Rules
- Working with Forms
- Complex Forms
- Complex Navigation
- Events and Listeners
- ActionListener Methods
- Implementing the ActionListener Interface
- ValueChangedListener Methods
- Implementing the
- Actions and Navigation
- Validation and Conversion
- Using Converters
- Configuring Converters on Input Tags
- Standard Converters
- Working with Complex Types
- Using Custom Converters for Validation
- Displaying Error Messages - Registering Custom Converters
- Validating Custom Value Types
- Registering Converters by Type
- Using Validators
- Configuring Validator Bindings in JSP
- Validator Methods
- Displaying Error Messages
- Creating Custom Validators
- Configuring Custom Validator Attributes
- Creating a Custom Validator Tag
- Using Converters
- JSF Implementations and Component Libraries
- Sun Reference Implementation
- MyFaces
- Tomahawk
- Trinidad and Tobago
- ICEFaces
- Component Suite
- AJAX Bridge
- Facelets
- Oracle ADF
- Trinidad Extensions
- JBoss Seam
- WebGalileo