Child pages
  • Upgrading from MyFaces 1.0.9 to 1.1.1
Skip to end of metadata
Go to start of metadata

Change project.xml dependencies.

If you start with:

Change to:

Remove StartupServletContextListener

Your web.xml used to need the following to enable MyFaces:

That's no longer necessary.

Replace "percentage" NumberConverter type with "percent"

The JSF 1.1 Javadoc on Sun's site incorrectly states that the NumberConverter tag takes the string "percentage" as a type. Instead, the specification (and the more recent versions of the implementations) states that "percent" should be be used.

Don't rely on NumberFormat automatically converting to Double

As described in the JavaDoc for the Gradebook's new NontrailingDoubleConverter class:

The standard JSF NumberConverter handles output formatting of double numbers nicely by printing them as an integer if there's nothing past the decimal point. On input either a Long or a Double might be returned from "getAsObject". In earlier versions of MyFaces, if the input value was going to a Double bean property, conversion would happen silently. In MyFaces 1.1.1, a IllegalArgumentException is thrown. This converter emulates the old behavior by converting Long values to Double values before passing them to the backing bean.

(I'll put this converter on the list of possible candidates to move into the shared "jsf" project for other applications to use.)

  • No labels