Summary
JavaServer Faces technology is a user interface framework for building web applications (standard framework included in JEE 6)
JavaServer Faces 2 (JSF 2) introduces a number of new features. It provides a standardized mechanism to support Ajax, input validation using annotations, facelets as default rendering engine (not JSP !), managed beans and some other features required by modern web application.
Objective:
This class combines lectures with hands-on experience that will help students to understand JSF 2.
Prerequisite:
Java Programming Language.
Duration
3 days
Table of Content
Chapter 1: Introduction
• What is JavaServer Faces? • Main Components • Benefits of JSF • What is JSF Application? • Why JSF? • Hello World Example
Chapter 2: JSF Architecture
• Physical Components • How Does JSF Work? • The FacesServlet • The Lifecycle Object • Reconstitute Component Tree • Apply Request Values • Process Validation • Update Model Values • Invoke Application • Render Response • Writing a JSF Application • Structure of Facelets Pages • Managed Bean Structure • Example
Chapter 3: Expression Language • What is EL? • Advantages of EL • EL Basics • Outputting Simple Bean Properties • Nested Bean Properties • Three Uses of #{...} • Getter vs. Setter Method • Using the ( ) Form • Collections Example • Predefined Variables • Expression Language Operators • EL Example
Chapter 4: Managed Beans • Managed Bean Definition • Three Parts • More Details • Pre Populating Input Fields • Named Beans • Bean Scopes • Request and Response Objects • Dependency Injection • Dependency Injection Example
Chapter 5: Page Navigation
• Implicit Navigation • Explicit Navigations • Navigation Rules • Example • Bean Declaration • ManagedBean vs. faces-config.xml • Wildcards in Navigation Rules • Example • Redirection • Compute Destination Page
Chapter 6: Event Model
• Overview • Type Of Event Listeners • ActionListener Event • Method Binding : ActionListener • ActionListener: Method Binding Example • <f:actionListener> Tag • <f:actionListener> Tag Example • ValueChangeListener • Method Binding: ValueChangeListener • ValueChangeListener: Method Binding Example • ValueChangeListener tag • Example
Chapter 7: Internationalization
• Introduction • Resource Bundle • Resource Bundle in faces-config • Displaying Messages • Accessing Locale from a Facelets • Example • Accessing Locale From a Class • Example • Setting Locale Dynamically • Example
Chapter 8: JSF Validation
• Overview • Validation Approaches • Implicit Automatic Validation • Precedence of Validity Tests • Example • Build in Validators • Conversion vs. Validation • Explicit Validation • Validation using Custom Validator Methods • Example
Chapter 9: Data Conversion
• Introduction To Convertor • Implicit and Explicit Conversions • Custom Conversions • Creating Custom Convertor • Custom Convertor Methods • Example
Chapter 10: JSF Tag Library • The h:inputText Tag • The h:commandButton Tag • The h:inputSecret Tag • The h:inputTextarea Tag • The h:selectBooleanCheckBox Tag • Example • The h:selectOneRadio Tag • Example • The h:selectOneMenue Tag • Example • The <h:messages> and <h:message> Tags
Chapter 11: Page Templating With Facelets • JSP and JSF Problem • Overview • Facelets Features • What is a Facelet? • ui Component • Example • Template • Example • Template Details • Main Template Tags • Example
|