Complete JavaServer Faces

 

 

 

Complete JavaServer Faces Training Class Summary

This comprehensive five-day course shows Java programmers how to build web applications with JavaServer Faces 2.0. We develop the best-practice concepts that are formalized by the JSF architecture, from model/view/controller to the UI component framework and request-handling lifecycle. Students start to discover that there is a "JSF way" of doing things, and learn not just APIs and tag libraries but the habit of slicing application logic into its most reusable forms: managed beans, event listeners, converters, validators, and more. Students also acquire a firm command of JSF development, learning to work with JSF's list and table components, building reusable composite components, and building Ajax applications. Simple, high-level Ajax functionality is covered, and students work more directly with JSF's JavaScript API and resource-management framework.

Audience: Java programmers wishing to learn JavaServer Faces.

Prerequisites: Java programming experience is required. A general understanding of Servlets and JSP is recommended. Basic knowledge of XML and HTML is helpful.

Class Length: 5 days

Complete JavaServer Faces Training Class Objectives
  • Describe the purpose and scope of the JSF architecture.
  • Build web applications using JSF’s FacesServlet, faces-config.xml, and the JSF request/response lifecycle.
  • Use Facelets tag libraries to build JSF views.
  • Use managed beans to encapsulate form handling and server-side presentation logic.
  • Implement control logic as JSF event listeners or action methods.
  • Use validators and converters to implement a validation phase for a JSF application.
  • Build composite UI fragments or custom components using Facelets.
  • Build Ajax applications with JSF: client-side behaviors and partial requests and responses followed by DOM updates.
Complete JavaServer Faces Training Class Detailed Outline
  1. Overview
    • JSF in Context
    • Perspectives: Servlets and JSP
    • Perspectives: MVC Frameworks
    • Perspectives: AWT and JFC
    • JavaServer Faces
    • JSF as an MVC Framework
    • Value Proposition: The Trees
    • Value Proposition: The Forest
    • Acquiring JSF
    • The JSF 2.0 RI Distribution
    • JSF Configuration: web.xml
    • JSF Configuration: faces-config.xml
    • Issues with JSP and JSF
    • Facelets
    • Eclipse
  2. Lifecycle
    • The Strategy Pattern
    • The Framework of a JSF Application
    • The Lifecycle Class
    • The FacesContext Class
    • The Request/Response Cycle
    • Partial Request Cycles
    • Lifecycle Phases
    • Who Does What
  3. UI Components
    • The Composite View Pattern
    • The UIComponent Class
    • Component Polymorphism
    • Behavioral Interfaces
    • Mixing In
    • The Core Component Library
    • The HTML Component Library
    • View Definition Language
    • Custom Tag Libraries
    • HTML Tags
    • Core Tags
    • Relationship to CSS
    • ID vs. Client ID vs. Label
    • The UISelectItem Class
    • Finding the Tree
    • Navigating the Tree
    • The binding Attribute
  4. Page Navigation
    • Page Flow in JSF
    • View Selection: Initial Request
    • View Selection: Recycling One Page
    • View Selection: From Page to Page
    • Implicit Navigation
    • Explicit Navigation
    • Static and Dynamic Outcomes
    • Problems with POSTback
    • Post/Redirect/Get
    • Support for HTTP GET
    • What to Use Where
  5. Managed Beans
    • JavaBeans and JSF
    • Backing Beans
    • The Factory Patterns
    • Managed Beans
    • Declaring Managed Beans
    • Managed Bean Annotations
    • Managed Beans as Backing Beans
    • The Unified Expression Language
    • Basic EL Grammar
    • Value and Method Expressions
    • Operators
    • Implicit Objects
    • Evaluating Expressions from Java
  6. Scopes
    • Scopes
    • JSF Scopes
    • Using JSF Scopes
    • Relationship between Scopes
    • Managed-Bean Annotations – A Good Idea?
    • Lifecycle Annotations
    • View Parameters
    • Passing Request Parameters
    • The Flash
    • Limitations of <c:set> and the Flash
  7. Dependency Injection
    • Managed Properties
    • Value Types
    • Dependency Injection
    • Dependencies and Bean Scopes
    • Surprises
    • The @ManagedProperty Annotation
  8. Facelets
    • Issues with JSP and JSF
    • JSP Custom Tags and JSF
    • Issues with JSTL and JSF
    • Enter Facelets
    • <ui:repeat>
    • Tag Libraries
    • Using Tag Libraries
    • Built-In Tag Libraries
  9. Events and Listeners
    • Making Things Happen
    • The Observer Pattern
    • The JSF Event Model
    • Event Types and Timing
    • Event Queueing
    • Multiple Queues
    • ActionEvents and Listeners
    • <f:actionListener>
    • The actionListener Attribute
    • The action Attribute and Dynamic Outcomes
    • Seeing the View vs. Setting the Outcome
    • ValueChangeEvents and Listeners
    • Attaching Value Change Listeners
    • Deferring Event Processing
  10. Lists and Tables
    • Why We Don’t Use <c:anything> <c:anyMore>
    • <ui:repeat>
    • <ui:repeat> vs. <c:forEach>
    • <h:dataTable>
    • Table and Column Facets
    • One Command per Row
    • Reading the Row Number
    • Pseudo-Maps
    • Working with Persistent Data
    • Parsing Query Results
    • Concurrency and Caching
    • Limiting the Scope of Queries
  11. Converters
    • Managing Data Flow
    • The Converter Interface
    • Life of a Datum
    • Standard Converters
    • <f:convertDateTime> and <f:convertNumber>
    • Custom Converters
    • The @FacesConverter Annotation
    • <f:converter>
    • Representing Persistent Objects
  12. Validators
    • Validating Input
    • The Validator Interface
    • Handling Validity Errors
    • Standard Validators and Required Values
    • Declaring Validation Rules in the View
    • Producing Error Messages
    • The FacesMessage Class
    • Message Keys
    • Message Parameters
    • Presenting Error Messages
    • The errorStyle and errorClass Attributes
    • Custom Validators
    • <f:validator> and the validator Attribute
    • Validating Multiple Inputs
    • JSF and "Bean Validation"
    • Using <f:validateBean>
  13. Resources
    • Resource Libraries
    • Deploying and Addressing Resources
    • <h:graphicImage>
    • Advantages of Resource Libraries
    • <h:outputScript> and <h:outputStylesheet>
    • Addressing Resources
    • @ResourceDependency
  14. Composites
    • Reuse in JSF
    • Limitations of Custom Tags
    • Composite Components
    • Deploying and Using Composites
    • Defining Composites
    • Interface
    • Implementation
    • Impact on the UI Tree
    • Using Attributes
    • Retargeting
    • Event Sources and Value Holders
  15. Ajax
    • What is Ajax?
    • A New Kind of HTTP Request
    • Request Formats
    • Asynchronous Response Handling
    • Assets and Liabilities of JSF
    • The State of the Art: JSF 1.x
    • The State of the Art: JSF 2.0
    • <f:ajax>
    • Surprises
    • The execute and render Attributes
    • Event Types
    • Ajax Listeners
  16. The JSF JavaScript API
    • The JSF JavaScript API
    • The jsf.ajax Object
    • Refining <f:ajax> with Callback Functions
    • The Request/Response Process
    • Using Hidden Inputs
    • Other JavaScript Functions