Training > All Courses > Java > J2EE > JSF 2.0

Course Summary

Let's admit it: JSF 1.x was a pain in the neck. Sure, it was the only major Web app framework that was part of the Java EE spec, and it had lots of great third-part component libraries. But, for ordinary developers it was tedious and cumbersome to use. However, JSF 2.0 is a dramatic improvement in almost every way: more powerful, much simpler to use, has integrated Ajax support, and is better from top to bottom. This course will give a thorough introduction to JSF 2.0 including annotations, defaults, Ajax functionality, page navigation, validation, event handling, page templating with facelets, composite components, and lots more.

This course is developed and taught by Marty Hall, an experienced developer, award-winning instructor, popular conference speaker (5 times at JavaOne), and author of several bestselling Java books.

Duration

5 days.

Objectives

JSF 2.0 is a dramatic improvement in almost every way.In JSF2 course, you will learn:

  • Ease of JSF 2.0 development. It is much simpler to use, borrowing "configuration by convention" ideas from Ruby on Rails and similar libraries. Many tasks can be performed with simple annotations and conventions, with no editing of faces-config.xml.
  • New, more powerful features of JSF 2.0. JSF 2.0 has many new features including a more concise way to output values, much more debugging help, new bean scopes, more and better validators, support for conditional navigation, and the ability to bookmark results pages.
  • JSF 2.0-integrated Ajax support. Taking a cue from Ajax4jsf and AjaxTags, JSF 2.0 has easy-to-use tags that enable Ajax functionality.
  • Facelets in JSF 2.0. The popular Facelets library is now the default way to produce JSF pages. This provides simpler and more consistent syntax, and page templating (better than Tiles!) is built right in.
  • Composite components for mere mortals. The API provided by JSF 1.x was very powerful for vendors making component libraries, but far too complex for ordinary JSF developers. The new Facelets-based approach is dramatically simpler, making composite components a standard part of every JSF developer's toolkit.
  • Free and portable fatures of JSF 2.0. Although JSF 2.0 is part of the Java EE 6 specification, it can easily be used in existing servers. Our class will use Tomcat, but the applications can be deployed to any Java server that supports servlets 2.5 or later.

Audience

Experienced Java web developers, architects, and team leads who want to learn about JavaServer Faces technology.

The course consists of an approximately equal mixture of lecture and hands-on lab time. The course assumes that all students already have at least moderate previous Java experience, but not necessarily any experience with previous JSF versions. Although the course will use Java 6, previous experience with earlier Java versions is sufficient. However, the course will definitely move too fast for those with little or no previous experience with any Java version. Working knowledge of HTML is helpful but not absolutely required.

Additional Notes

About Marty Hall - Your Instructor

Marty Hall and James Gosling Marty Hall is the author of six popular Java EE books, including Core Servlets and JavaServer Pages, the all-time worldwide bestselling servlet/JSP book, published in Bulgarian, Chinese Simplified Script (Mainland China), Chinese Traditional Script (Taiwan), Czech, Greek, English, French, German, Hebrew, Japanese, Korean, Macedonian, Polish, Portuguese, Russian, and Spanish.
Marty is president of coreservlets.com, a training and consulting company focusing on server-side Java technology and Rich Internet Apps with Ajax.
In addition to long Java development and consulting experience, Marty has an extensive background in teaching and training, having given training courses on J2EE and Ajax topics in Japan, Canada, Australia, the Philippines, Mexico, Puerto Rico, and dozens of US venues.
A popular and entertaining speaker, Marty has also spoken at conferences and user groups around the world, including Comdex, the Web 2.0 Expo, and five times at JavaOne. Marty is also adjunct faculty in the Johns Hopkins University part-time graduate program in Computer Science, where he directs the Java and Web-related concentration areas.

Outline

The course is in lecture-lab format, with about equal time spent on the lectures as on hands-on programming exercises.

  • Overview: Pros, Cons, Setup, Deployment
  • Basic Applications
  • Using Annotations
  • Handling Request Parameters with Managed Beans
  • The JSF 2.0 Expression Language
  • Explicit Bean Configuration and Navigation Rules
  • Ajax Support: Part I
  • Ajax Support: Part II
  • Page Templating with Facelets
  • Using Properties Files (Resource Bundles)
  • Handling Events
  • GET Support and Bookmarking Results Pages
  • Building Input Forms with the h: Library
  • Validating User Input and Redisplaying Incomplete Forms
  • Displaying JSF Data Tables
  • Handling Variable-Length Data with Looping Tags
  • Building Composite Components