Course Description

This 2-day hands-on, Java Server Faces (JSF) training course teaches Java web developers how to create Java Server Faces (JSF) 2.0 based web applications. After a quick introduction to the technology, students will learn how to:

  • create managed beans and how to use the JSF Core and HTML tag libraries to generate dynamic HTML content.
  • The JSF life cycle and how to trigger server-side event handler code.
  • How to use the data table component to easily display large amounts of data in an HTML table.
  • Coverage of validation and conversion, including customisation of these phases.
  • How to use the JSF 2.0 Ajax capabilities.

 

Pre-requisites

Attendance at our  Java Programming Introduction and Java Web Programming training courses, as well as familiarity with HTML.

 

Who is this course for?

For Web developers who want to efficiently create complex web applications.

 

Course content

Getting Started with JSF

GUI Development
Java Server Faces
A JSF Application
JSF Components
Managed Beans
Configuration Files
JSF Application Structure
Running the Application

Managed Beans

Managed Beans & MVC
Properties
Managed Bean annotations
Bean Scope annotations
Value Expressions
Method Expressions

JSF Tag Libraries

The JSF Component Tree
JSF Tag Libraries
Resources
Forms
Input Tags
Output Tags
Submitting Form Data with HTTP POST
View Parameters
Passing Data with HTTP GET
Checkboxes
Radio Buttons, ListBoxes & Menus
Panels

JSF Life cycle and Event Handling

JSF Life cycle Overview
Restore View Phase
Apply Request Values Phase
Process Validation Phase
Update Model Values Phase
Invoke Application Phase
Render Response Phase
JSF Events
Action Events
Value Change Events
Immediate Events

Data Table Component

Data Tables
Basic Structure
Facets
Styles
Adding Editable Components
DataModel
Sorting
Scrolling

Validators and Converters

Validation and Conversion within JSF Lifecycle
Converting Dates
Converting Numbers
Displaying Conversion Errors
Built-in Validators
Customising Error Messages
Writing your own Converter
Custom Converter Configuration
Writing your own Validator

AJAX

AJAX and JSF
Events
Execute and Render
Grouping
Validation
The onevent Attribute
The onerror Attribute
The listener Attribute

Internationalisation

I18N and L10N
Resource Bundles
Configuring a Resource Bundle
Using a Resource Bundle
Specifying a Locale
I18N in Custom Code
Dates and Numbers