HTML and CSS Reference
In-Depth Information
The new XML namespaces are applied in the empty Facelets file in Listing 5-31.
Listing 5-31. Facelet View Using the new XML Namespaces
<html xmlns=" "
xmlns:cc=" "
xmlns:f=" "
xmlns:h=" "
xmlns:c=" "
xmlns:fn=" "
xmlns:ui=" "
xmlns:p=" "
xmlns:jsf=" " >
Backwards Compatibility
There are two issues affecting backwards compatibility rooted in unclear specifications in prior versions of JSF. Most
applications will be completely unaffected by these two issues, but in case your application is affected the issues are
described in the following.
The first issue is due to a mistake in the specification where exceptions ended up being swallowed silently
( javax.faces.event.MethodExpressionValueChangeListener. processValueChange() and javax.faces.event.
MethodExpressionActionListener.processAction() ). With a clarification in the specification of JSF 2.2, exceptions
previously being swallowed are now being thrown to the exception handler. Any application depending on the
exceptions being swallowed must implement a safeguard to avoid exceptions being unhandled.
The second issue is due to unexpected behavior based on the prior JSF specification. In JSF 2.2 the specification
was clarified and as a consequence a couple of return types had to change. Specifically it is the PropertyDescriptor s
returned when accessing the attributes of a composite component inside the composite interface. getValue() and
getValue(java.lang.String) will now return javax.el.ValueExpression and java.lang.Class , respectively. Any
application accessing the PropertyDescriptors directly must take into account the changed return types.
Despite JSF 2.2 not being a major evolution for JSF, it is clear that the 2.2 release offers many new features and changes
that the community has been asking for over the years. Notably are the four big-ticket features including HTML5-
friendly markup, resource library contracts, faces flows, and stateless views. Among other significant changes, we
looked at the file upload component that finally made its way to the core of JSF. The file upload component supports
not just traditional file upload but also Ajax-based uploads.
Developers who want to upgrade their JSF 2.0 and 2.1 applications can do so almost seamlessly. As examined in
the “Backwards Compatibility” section, there are very few issues breaking backwards compatibility, and it is estimated
that very few applications are affected.
Search WWH ::

Custom Search