HomeTrainingCoursewareList of CoursesContact UsSearch
Call (605) 391-2110 to speak with a sales representative, or email us at sales@javalicense.com.
Course Title: Apache MyFaces for Java Developers
Course Length: 3 Days
Course Number: JSF300
Delivery: Instructor-led, On-Site
Audience: Java Web Developers with a good working knowledge of the Java Programming Language and experience with JavaServer Pages and Servlets.
Description: Learn how to develop Java Web Applications using JavaServer Faces technology and Apache MyFaces. Students will learn the fundamentals of the JavaServer Faces technology and how to use Apache MyFaces to develop Web 2.0-capable Web applications using Ajax and the MyFaces user-interface components.
Course Outline:

JSF Intro, Overview, and Setup

  • Understanding JSF
    • Different views of JSF
    • Comparing JSF to standard servlet/JSP technology
    • Comparing JSF to Apache Struts
  • Setting Up JSF
    • Downloading and installing in Tomcat
    • Testing JSF
    • Setting up JSF applications
    • Accessing JSF documentation

Controlling JSF Page Navigation

  • JSF flow of control
  • The basic steps in using JSF
  • Static navigation
    • One result mapping
  • Dynamic navigation
    • Multiple result mappings

Managed Beans

  • Using beans to represent request parameters
  • Declaring beans in faces-config.xml
  • Outputting bean properties
    • Standard JSF approach
    • JSP 2.0 expression language

The JSF Expression Language

  • Motivating use of the expression language
  • Comparing to the JSP 2.0 EL
  • Accessing bean properties
  • Submitting bean properties
    • Expressions in output values
    • Expressions in submission values
    • Expressions for action controllers
  • Accessing collection elements
  • Using implicit objects and operators

JSF Properties Files

  • Loading properties files
  • Simple messages
  • Parameterized messages
  • Internationalized messages

JSF Event Handling

  • Comparing action controllers to event listeners
  • Action listeners
  • Value change listeners
  • Using JavaScript to submit form
    • Browser incompatibilities
  • Combining action listeners and action controllers in the same GUI element

The JSF "h" (HTML) Package

  • Most common usage
  • Shared attributes
  • Implied attributes
  • Elements that can invoke action controllers/listeners
  • Elements that can invoke value change listeners
  • Elements that display lists of items

Custom Apache MyFaces Components (Tomahawk)

  • Tomahawk vs. Trinidad and Tobago
  • Getting the MyFaces components
  • Configuring MyFaces to use Tomahawk
  • Most popular MyFaces components

The Ajax4jsf Component Library

  • Ajax motivation
  • Installation
  • Main Ajax4jsf Elements
    • a4j:commandButton
    • a4j:commandLink
    • a4j:poll
    • a4j:support
  • Limitations on use of h:outputText with Ajax4jsf
  • Other Ajax Toolkits

Validating User Input

  • Manual validation
  • Implicit automatic validation
  • Explicit validation
  • MyFaces validators
  • Creating custom validators

Using JSF Data Tables

  • Motivation
  • Basic syntax
  • Defining table headings
  • Formatting tables with style sheets
  • Displaying database tables

JSP Custom Tag Libraries: Basics

  • Java-based tags
    • Components of a tag library
    • Basic tags
    • Tags that use attributes
    • Tags that use body content
    • Tags that optionally use body content
  • JSP-based tags (tag files)
    • Components of a tag library
    • Basic tags
    • Tags that use attributes
    • Tags that use body content

Developing Custom Components in JSF

  • Main Pieces of Custom Components
    • Java class that extends UIComponent
    • Custom JSP tag
    • TLD file that declares custom tag
    • Entry in faces-config.xml
    • JSP page that uses custom tag
  • Simple output-only components
  • Components that accept attributes
  • Components that accept input

Facelets and Page Templating

  • Facelets motivation
  • Installation and setup
  • Basic mechanism
    • Template file and ui:insert
    • Client file and ui:define
  • Templating with includes
    • Why ui:include is better than jsp:include
  • Handling relative URLs
  • Passing data with jsp:param

Using JSTL with JSF

  • Obtaining JSTL documentation and code
  • The JSTL Expression Language
  • Looping Tags
  • Conditional Evaluation Tags
  • Database Access Tags
  • Preserving the MVC Model
  • Other Tags
JLicense, Inc. Copyright 2007. This site runs on a Tomcat server behind Apache's httpd Web server and uses JavaServer Pages, JavaServer Faces, JBoss RichFaces, and Ajax.