877-277-2477
info@capstonecourseware.com
116-GF. Migrating to JSF 2.0
Version 2.0

Book cover

This fast-paced course helps experienced JSF-1.x developers jump into the much-improved JSF-2.0 architecture. We highlight various improvements in pre-existing techniques -- implicit navigation, new bean scopes, and so forth -- and then spend most of the course on features that are entirely new to JSF 2.0. Students refactor applications to take advantage of new support HTTP GET requests and query strings, and learn to use Facelets and managed-bean annotations, and to build JSF2 composite components. JSF 2.0 is much more Ajax-aware than its predecessor, and the course concludes with a tour of lifecycle enhancements, the <f:ajax> tag, and the standard JavaScript API to build Ajax applications in a straightforward way.

Prerequisites

  • Prior experience with JSF 1.x is strictly required.
  • Prior experience with an Ajax-aware JSF component library will be helpful in understanding some of the new features, but is not a requirement.

Learning Objectives

  • Understand the key expansions in the JSF 2.0 architecture.
  • Build applications in the typical JSF 2.0 style.
  • Migrate from JSP to Facelets as the JSF view definition language.
  • Design page flows to take best advantage of GET, POST, and redirect navigations, and pass form parameters and server-side information effectively in all cases.
  • Use the new view scope for managed beans.
  • Build composite UI fragments or custom components using Facelets
  • Build Ajax applications with JSF: client-side behaviors and partial requests and responses followed by DOM updates

Timeline: 2 days.

Server Support: GlassFish

  • This version of the course works with the GlassFish server. Our Java EE courses are available in variants that support various server products, including Tomcat, GlassFish, JBoss, and WebLogic. For more details, and to find a desired server-specific version of a course, see our server-support matrix.

IDE Support: Eclipse Helios

  • In addition to the primary lab files, an optional overlay is available that adds support for Eclipse Helios. Students can code, build, deploy, and test all exercises from within the IDE, and take advantage of built-in editors, integrated debugging, and wizards for JSF applications, XML files, JSPs, and more. See also our orientation to Using Capstone's Eclipse Overlays.

Chapter 1. What's New in JSF 2.0

  • Overview of New Features
  • Issues with JSP and JSF
  • Facelets
  • Implicit Navigation
  • Conditional Navigation
  • Support for HTTP Get
  • System Events
  • New Scopes
  • Annotations
  • Validation Enhancements
  • JSR-303 Support
  • Resources
  • Composites
  • Ajax

Chapter 2. Scopes

  • View and "None" Scope
  • Dependencies and Bean Scopes
  • Relationship Between Request and View Scopes

Chapter 3. Using HTTP GET

  • Problems with POSTback
  • Post/Redirect/Get
  • Support for HTTP GET
  • View Parameters
  • The Flash
  • Limitations

Chapter 4. Annotations

  • @ManagedBean and Related Annotations
  • The @ManagedProperty Annotation
  • Lifecycle Annotations
  • Best Practice Recommendations
  • @FacesConverter and @FacesValidator

Chapter 5. Facelets

  • Migrating from JSP
  • View Definition Languages
  • Facelets
  • Tag Libraries
  • Writing and Using Custom Tags

Chapter 6. Resources

  • Resource Libraries
  • Deploying Images, Scripts, and Stylesheets
  • Addressing Resources

Chapter 7. Composites

  • Limitations of Custom Tags
  • Composite Components
  • Encapsulation
  • Deploying and Using Composites
  • Interface and Implementation
  • Impact on the UI Tree
  • Attributes
  • Retargeting

Chapter 8. Ajax

  • What is Ajax?
  • The XMLHttpRequest Object
  • Ajax and the JSF Lifecycle
  • Using <f:ajax>
  • execute and render Attributes
  • Ajax Listeners

System Requirements

Hardware Requirements (Minimum) Core 2 Duo, 1.5 GHz, 2 gig RAM, 1 gig disk space.
Hardware Requirements (Recommended) Core 2 Duo, 2.5 GHz GHz, 4 gig RAM, 1 gig disk space.
Operating System Tested on Windows 7 and Windows XP Professional. Course software should be viable on all systems which support a Java 6 Developer's Kit.
Network and Security Limited privileges required -- please see our standard security requirements.
Software Requirements All free downloadable tools.