JavaServer Faces (JSF) Development Course

Course Code: IN 551
Course Abstract:

This course is an introduction to the JavaServer Faces standard for Java web application development. The course covers all aspects of JSF including the JSF lifecycle and environment, JSF integration with other web application technologies, and development of custom JSF components. The course also illustrates and discusses a number of common JSF development challenges and their solutions, and uses agile development tools and techniques throughout.

Audience:

This course is designed for experienced Java web application developers who are familiar with the core servlets and JSP APIs, but who want to learn how to use the new JSF-based web application development frameworks to improve their web application development productivity.

Duration: 3 days
Learning Outcomes:

Upon completion of this course, the participant will be able to:

> Use the JavaServer Faces standard for creating Java web applications
> Use features of JSF, including declarative navigation, string externalization, validators and converters, JSF lifecycle events, JSF APIs for accessing external environments, and others
> Gain detailed knowledge of the JSF lifecycle and how to customize it
> Become familiar with the steps necessary to build custom JSF components, validators, and converters
Course Topics:

Introduction To JSF
Overview
Advantages Of Web Applications
Java Web Applications
Problems with Web Applications
Solution: Web Frameworks
JavaServer Faces (JSF)
JSF Web Application
Example: Login Screen
Authenticator Class
Managed Bean: LoginController
View: JSF JSP Code
View: HTML Form Generation
View: Value and Method Bindings
View Result: accessGranted.jsp
Lifecycle for Successful Login
Lifecycle for Failed Login
JSF Config: faces-config.xml
Servlet Config: web.xml
JSF Web Application Structure
Review
Lab: Login Page

JSF Fundamentals
Overview
JSF Implementations
JSF Setup
Example Application
JSF Application Design
Example Application Page Flow
UI Layer vs. Business Model
Simple Case: JSF Model/Controller
Complex Case: Separate Model
Sample Data Access Methods
Managed Beans and the Model
Example: ProductController
JSF Expression Language
Expression Language Evaluation
Value and Method Binding
Expression Language Syntax
EL Implicit Objects
JSF Navigation Configuration
Forward vs. Redirect
Managed Bean Configuration
Managed Bean Initialization
Example: Existing & New Products
Review
Lab: Edit Product

JSF UI Components
Overview
JSF UI Components
JSF Tag Libraries
UI Component Tree
UI Component Families
Component Attributes
Using the "id" Attribute
Using the "value" Attribute
Using the "rendered" Attribute
Pass-through Attributes
The View Root
Basic Output Components
Using Output Links
Containers and Subcomponents
Form Component
Basic Input Components
Selection Components
Specifying Selection Options
Example: Parent Category Options
Review
Lab: Edit Category

 

JSF Advanced Components
Overview
Subviews
Limitations of Subviews
Solutions for Subviews
Linking to Subview Controllers
Messages Components
Global vs. Local Messages
Container Components
Using <h:panelGroup>
Using <h:panelGrid>
Using <f:verbatim>
Generating Data Tables
Example Data Table
Data Table Facets
Listeners, Validators, Converters
Review
Lab: Show Category and Subviews

JSF I18N and Validations
Overview
JSF and I18N
JSF I18N Configuration
User-Locale Specification
Customizing Standard Messages
Handling Application Messages
Action Method Error Messages
Example: Message Manager
Using Our Message Manager
Configuring Our Message Manager
Service Manager vs. Backing Bean
Converters
Converting Dates and Numbers
Validation Properties
Custom Validation Methods
Standard Validators
Validator and Converter Messages
Review
Lab: Validations, Errors, Messages

JSF Events and Lifecycle
Overview
JSF Events Basics
Event Listeners
Event Listener Logic
Problems with Value Changes
JSF LifeCycle
Special Lifecycle Cases
View Storage
Phase 1: Restore View
Phase 2: Apply Requests Values
Phase 3: Process Validations
Phase 4: Update Model Values
Phase 5: Invoke Application
Phase 6: Render Response
Lifecycle Customization
Example: View/Model Mismatches
The Mismatch Problems
Solution: Model Adapter
Example Adapter: OrderItem
OrderController Logic
Deletion Logic in Action Method
Edit Order View Logic
Review
Lab: Edit Order

JSF Integration
Overview
System Services
Example: Data Access Objects
Example DAO Code
Service Managers for Integration
Using Service Managers
Service Manager vs. Backing Bean
Example: Testing with Mock DAO
Access to the Servlet API
Minimize Servlet-Specific Code
Managing Session Data
JSP-to-JSF Integration
JSF-to-JSP Integration
JSP Integration Problems
Application Initialization Logic
Integration with Other Frameworks
CSS Integration
Style Classes for JSF Components
JavaScript Integration
JavaScript Validation Logic
How Many Layers to Use
Review
Lab: JSF Integration

The JSF Environment
Overview
Caveat for Customization
JSF Package Structure
Core JSF Processing
The Faces Servlet
The Faces Context
The External Context
The Application Object
Component Interfaces

The JSF Life Cycle
JSF Events
Registering Phase Listeners
Phase Id Constants
The Render Kit
Components and Renderers
Rendering Control
Review
Lab: The JSF Environment

JSF Custom Components
Overview
Caveat for Customization
Steps for Custom UI Components
Example Component
Example Custom Tag
Example Configuration
Custom Components in JSP
Class, Type and Family
Component Inheritance Hierarchy
Component Superclasses
Component State
Saving/Restoring State
Output Encoding
Input Decoding
Value Holders
Editable Value Holders
Events and Action Sources
Naming Containers
Custom JSP Tags
Review
Lab: JSF Custom Components

JSF Custom Validators and Converters
Overview
Custom Validations
Conversion and Validation Errors
Custom Validators
Example Validator
Example Validator Tag
Example Configuration
Custom Validator in JSP
One-Shot Validation Methods
Converters: By Class or ID
Custom Converters
Example Converter
Example Configuration
Using Simple Converters
Handling Null Values
State and Validators/Converters
Packaging Custom Components
Review
Lab: Validators and Converters

Prerequisites:

Prior experience with the Java language, servlets and JSP is required.

Note: All fields are required
At the present time we do not offer training for individuals or groups less then 6 individuals. We apologize for any inconvenience.
We Value Your Privacy!

Ready to get started or in need of more information? Contact us today.

Go To Blog Virtual Learning