Realdolmen Education

Details

JavaServer Faces 2.2

This course is currently not scheduled on the open calendar, but can be organized on request.

Request Course

Duration

3 day(s)

Audience

Java developers, architects and designers who want to learn about the standard Java EE framework to create web applications: JavaServer Faces 2

Prerequisites

Course participants should have a basic understanding of Java's web API: Servlets & JSP

Objectives

The objective of this course it to provide a good starting point for any Java developer, architect or designer to build flexible web applications with JavaServer Faces 2. Participants who already have experience with JavaServer Faces 2 can follow this course to improve their insight and become more productive in building JavaServer Faces 2 based web applications.

Methods

Classroom based setup with practical hands-on exercises.

Description

When designing and developing web applications in Java, one needs to make a choice about which frameworks to use.For the presentation layer, there are a lot of different options in Java. For example, one could use Servlets & JSP, Spring MVC, Vaadin and many others. JavaServer Faces 2 combines the strengths of many of these frameworks, and is offered as a part of the Java EE standard. For this reason, it should be the framework of choice, and this course will was made to prove it!

JavaServer Faces 2's aim is to simplify the creation of web applications by using the proven concepts of "Plain Old Java Objects" and "Inversion Of Control" to link the presentation layer to the Java backend with minimal configuration. Annotations are used as the primary mechanism for configuring web applications, but traditional XML descriptors are available as well. JavaServer Faces 2 also provides out-of-the-box support for most common problems associated with web applications, such as state management, validation of user input, page navigation, templating, internationalisation and AJAX. All of these topics are included in the course.

Java Server Faces 2 is considered as a view-oriented framework, which means that tasks are centered around creating view documents (Facelets), and connecting them to any Java backend (EJBs, Spring, ...).The framework uses an internal representation based on UI components. These components are independent of any output format. Many add-on libraries are available to add additional advanced components such as BootFaces, PrimeFaces and OmniFaces. It is thus safe to say that JavaServer Faces 2 is a good investment for the future. By teaching employees the skills to work with JavaServer Faces 2, companies can assure their investment lasts for many years to come!

By the end of the course, participants will have a good idea of all the possibilities of the framework, and have enough practical know-how based on the instructor-led exercises, to extend this expertise on their own and become even better developers, architects or designers!

Contents

  • JavaServer Faces 2.x
    • Goals
      • Course Objective
      • Agenda
    • Introduction
      • A brief history: why web frameworks?
      • A brief history: Java standards
      • A brief history: why add JSF as a standard?
      • What is JSF?
      • The MVC Pattern
      • JSF Architecture Overview
      • Architecture Breakdown
    • JSF Implementations & Extensions
      • JSF Implementations
      • JSF Extension frameworks
    • Getting Started
      • Choose an application server
      • Choose an IDE
      • Adding JSF to a web project
      • Configure the web application
      • Add a page
      • Testing the page
      • Exercise: Getting Started
    • Managed Beans
      • What are managed beans?
      • Creating a simple managed bean
      • Showing contents of managed beans on view
      • Specifying a custom bean name
      • Eager versus lazy managed beans
      • Injecting values and dependencies
      • Injecting Literals
      • Injecting references to other beans
      • Bean Scopes
      • Specifying Bean Scope
      • Referencing beans with different scopes
      • @PostConstruct and @PreDestroy
      • Using XML configuration
      • Exercise: Managed Beans
    • Creating forms
      • JSF value binding expression language
      • Unified expression language
      • Expression Language Operators
      • Implicit variables
      • Introduction to Facelets
      • Creating a form
      • Form commands
      • Binding form input
      • Identifiers and the component tree
      • Binding individual UIComponents
      • Best practice: backing vs managed bean
      • Some basic form components: commands
      • Some basic form components: input
      • Some basic form components: selections
      • Exercise: Creating forms
    • Facelets
      • Facelets review
      • Why use Facelets instead of just JSP?
      • What else can we do with Facelets?
      • Using JSTL tags
      • Facelets templates
      • The UI namespace
      • Facelets templates: include
      • Facelets templates: composition
      • Facelets UI components
      • Facelet Tag Libraries
      • Custom UIComponents
      • Exercise: Facelets
    • Navigation
      • Types of navigation
      • Implicit static navigation
      • Implicit dynamic navigation
      • Rule-based navigation
      • Global navigation
      • Conditional navigation
      • Exercise: Navigation
    • Other useful components
      • Standard components
      • A not so short list of standard HTML components
      • A not so short list of standard core components
      • Differentiate a page for editing
      • Structuring data on the page
      • Replacing a table based layout
      • Creating data tables
      • Support for GET requests
      • Exercise: Other useful components
    • Validation
      • Validation concepts
      • Values stored by JSF
      • Syntax validation
      • Adding validators
      • Core validation tags
      • Showing validation error messages
      • Exercise: Basic validation
      • Business validation
      • Custom validation method
      • Custom validator class
      • Exercise: Custom validation
      • JavaBean Validation API (JSR-303)
      • Enabling JavaBean Validation
      • Use of the JavaBean Validation API with JSF
      • Some simple built-in validators
      • Custom JavaBean Validation validators
      • Validation overview
      • Exercise: JavaBean Validation
    • Conversion
      • Converters
      • Converting Numbers
      • Converting Dates
      • Exercise: Standard converters
      • Custom Converter
      • Custom converter
      • Exercise: Custom converter
    • Internationalisation
      • Internationalization and localization
      • Properties file
      • Supported locales
      • Displaying internationalised messages
      • Overriding default error messages
      • Manipulating the locale programmatically
      • Obtaining messages in Java code
      • Customizing JavaBean Validation API messages
      • Exercise: Internationalisation
    • Lifecycle of JSF components
      • History behind the JSF lifecycle model
      • The view
      • JSF request processing lifecycle
      • Phase 1: Restore View
      • Phase 2: Apply Request Values
      • Phase 3: Process Validations
      • Phase 4: Update Model Values
      • Phase 5: Invoke Application
      • Phase 6: Render Response
    • Handling events
      • Events and listeners
      • Working with events
      • The event / listener mechanism
      • Action events
      • Registering ActionEvent listeners
      • Immediate commands
      • Creating an immediate command
      • Value change events
      • Registering ValueChangeEvent listeners
      • Immediate input
      • Creating immediate input components
      • Phase events
      • System events
      • Listening for system events
      • Listening for component system events
      • Influencing the lifecycle
      • Exercise: Handling events
    • Ajax support
      • What is Ajax?
      • Ajax support in JSF
      • Partial submits and partial re-renders
      • Enabling support for Ajax
      • The Ajax tag
      • Ajax attributes: event
      • Ajax attributes: execute
      • Ajax attributes: render
      • Special values for execute and render
      • Ajax attributes: listener
      • A simple search users page
      • The managed bean
      • The Facelets page
      • Exercise: Ajax support
    • What is new in JSF 2.2?
      • Flows
      • HTML5 Support
      • View Actions
      • File Upload
      • Support for CDI
      • Other Improvements
      • Exercise JavaServer Faces
    • Conclusions
      • Conclusion
      • References