by Kuldip Bajwa
Below is the list of JSF 2.0 features vs JSF 1.2
- AJAX support within tags – had to write bespoke tags previously
- Composite components – This feature enables creating true JSF components as aggregations of other JSF components. With this feature, it is easy to build your own custom JSF components and to refactor your existing views into reusable components, complete with listeners, attributes, and events.
- Partial State Saving – one of the biggest complaints agasint JSF has been the amount of memory it consumes to maintain view state between requests. This feature dramatically reduces the amount of memory for this purpose, as well as greatly simplifying the API for handling state when developing custom components.
- View Parameters – Another big complaint against JSF is insistence on using POST for inter-page navigations.
- Navigation Enhancements – JSF 2.0 bring several enhancements to navigation, including bookmarkability, navigation with XML navigation rules, conditional navigation, support for the POST-REDIRECT-GET pattern, flash, and runtime, and runtime inspection of navigation rules.
- Exception Handling – JSF 2.0 now has a central ExceptionHandler through which all exception funnelled. This enables easily constructing an error page that uses JSF components.
- Expression Language Enhancements – Several new implicit objects have been introduced, and the EL now supports method invocation on arbitrary Java methods, including parameter passing.
- Validation – An entirely new Java specification has been developed to address validation, JSR-303 Bean Validation. This specification integrates well with JSF 2.0.
- New scopes – In addition to the flash scope, JSF 2.0 also provides a mechanism for defining custom scopes.
- FacesContext Servlet access is now available during application startup and shutdown.
- JSF 2.0 now allows the developer to tell the runtime in what phase of the software development lifecycle the runtime is executing.
- Annotations may obviate the need for XML. Navigation can be completely be done without XML configuration