|
Complete JavaServer™ Faces (JSF) represents a best of breed web creation solution. Built on top of the extremely successful Java EE platform, JSF provides drag and drop web site creation. This ease of use web site creation gives Java an elegant, visual, and developer friendly way to create highly scalable and well architected Java EE based web sites. In this class you will see how to create web sites using JSF. You will use both drag and drop and implement by hand techniques, giving you the chance to experience how easy web site creation can become while still discovering the nitty-gritty details of what is happening behind the drag and drop.
Course Outline
Introduction to JavaServer Faces
- What is JavaServer Faces (JSF)?
- Why Use JSF?
- Nature of a JSF Application
- The Sun Reference Implementation (RI)
- JSF and MVC
- Faces Servlet
- Managed Bean
- The View
- A Simple JSF Application
- The Input Form: form.jsp
- The Result: thanks.jsp
- The Controller: AddressBean
- Page Flow or Navigation Rule
- How Does the Application Work?
- Under the Covers: The Rendered Form HTML
- Under the Covers: The Layout Tree
Managed Bean
- What is a Managed Bean?
- Why Do You Need Managed Beans?
- Managed Bean As a Controller
- Registering a Managed Bean
- Lifecycle of a Managed Bean
- Initializing a Managed Bean
- What Scope to Use?
- Value Binding
- Property Data Conversion
- Advanced Property Types
- Component Binding
- Other Binding Types
- Basic Input Processing
- Advanced Input Processing
- JSF Expression Language
- Language Basics
- Use of Expression in JSF
- Basic Expression
- Property Access Expression
- Map Access Expression
- Complex Access Expression
- Predefined Objects
- Operators
User Interface Components
- JSF UI Components
- JSF Component Tag Libraries
- Using the Tag Libraries
- HTML Tag Library
- Identifying Components
- Component Identifier
- Client Identifier
- Form Input Field Names
- Labels and Images
- Create a Form
- Buttons
- Links
- Adding Parameters to Links
- Text Input
- Simple Check Box
- Check Box Group
- Radio Button
- List Boxes
- Dynamic List Box
- JSF Core Library
- JSF Core Library - Components
- JSF Component Model
- Base Class Hierarchy
- Useful Base Classes
- Useful HTML Classes
JSF Event Handling
- Request Processing Phases
- Action Request Processing Phases
- JSF Event and Listener Model
- JSF Event Classes
- Event Classes
- Event Classes: Hierarchy
- Action Event Handling
- Action Event: Example
- Action Listener
- Value Change Event
- Value Change Event Handler
- Listener Classes
- Listener Interfaces
- Listener Classes: Hierarchy
- Action Listener Class
- Value Change Listener Class
- Phase Event Listener
- Request Processing Lifecycle
- Phase Identifiers
JSF Navigation
- JSF Navigation
- Example Action Listener
- faces-config.xml File
- JSF Navigation
- Navigation Rules: Example
- Choosing Between Redirect and Direct Rendering
- Navigation: Scenarios
Validation
- Validation
- Standard Validators
- Checking for Required Values
- Standard Validaton Error Messages
- Validation Process
- Sequence Diagram
- Immediate Components
- Accessing User Input
- Immediate Example
Advanced GUI Components
- HTML Panel
- Applying Styles
- Grouping Components
- Data Table
- Using Data Table
- Data Table Model
- Using a Data Table
- Displaying a Header and Footer Row
- Applying Styles
- Adding Links to a Row
- Using Component Binding
- Handling Action
- Using the Data Table Model
JSF Techniques
- A Typical Application
- The Create Form
- Create Action Method
- Listing Items
- Editing an Item
- Adding the Edit Link
- The Edit Form
- Update Item
- Things to Keep in Mind
Using Java Standard Template Library JSTL with JSF
- Introduction to JSTL
- Using JSTL with JSF
- The Tag
- International Text Display Tags
Custom Components
- Custom Components
- Requirements to Develop Custom Components
- Packages Useful for Custom Component Developer
- javax.faces.component.UIComponent
- Decoding
- UIComponentTag
- Implementing Custom Component Tags
- FacesContext
- javax.faces.application.Application
- javax.faces.context.ResponseWriter
- javax.faces.component.EditableValueHolder
- Tag Library: TLD
- faces configuration file: faces-config.xml
- faces-config.xml
- Sample.jsp: Example Showing the Relationship Between the JSF Artifacts
- External Renderer
- Render Defined in faces-config File
- Implementing the Renderer
- Event Listeners
- Using ActionListener in JSP
- ActionListener in the Java Code
- ActionListeners in JSF
- Create Input Form
- Input Form (Code)
- Update faces-config.xml
- ActionEvent Handling
Data Conversion Model
- Conversion Overview
- Different Viewpoints of Data
- Process of Conversion
- Why Local Values?
- Types of Standard Converters
- Standard Converters with JSF
- Three Ways to Use Standard Converters
- Bind UI Component to Backing Bean Property
- Use "converter" Attribute on the UI Component
- Use Tag with ConverterId Attribute
- Usage of Standard Converters
- Output of Using Standard Converters
- Converter Attribute
- Standard Converters to Display Output
- Standard Converters: Screen Shot
- Conversion Errors
- Displaying Error Messages
- Conversion Tag
- Conversion Error: Display
- Conversion Error
- Standard Validators
- Validation Errors: Screen Shot
- Standard Validators
- Check Required Values
- Custom Converter
- Registering the Converter
- Using the Registered Converter
- Conversion Errors
Disclaimer:
Brand names and trademarks/trade names published herein are registered trademarks of other companies not affiliated with Alto Consulting and Training. Alto Consulting and Training is not an authorized dealer or affiliated with Red Hat or Sun Microsystems.
|