Posted by gmurray71
on June 20, 2005 at 2:36 PM PDT
JSF Components may be used to provide reusable AJAX functionality in web applications. This entry discusses different strategies for AJAX enabling new and existing JSF components.
Tor Norbye from the Creator team,
Ed Burns who is one of the JSF specification leads, and I have created a new BluePrints Solution Catalog entry titled:
Using JavaServer Faces Technology with AJAX .
This document details questions a JSF component developer may face when developing AJAX
- Should AJAX request handling be done in a separate servlet controller or should it be handled by the JavaServer Faces technology life cycle?
- How can existing components be AJAX-enabled without rewriting them?
- How does the programming model differ between component writer and page developer?
- How should I organize the project structure in my workspace?
We discuss 3 strategies for developing JSF components that support AJAX which include:
- Strategy 2: A Custom JavaServer Faces Component with Separate AJAX Controller - A means of separating JSF code from AJAX processing code. In this case the developer is given a little more flexibility at the expense of not being as closely coupled to the JSF runtime. This solution is great for those that want to centralize AJAX processing or potentially use the same AJAX processing code outside of the context of a JSF runtime.
- Strategy 3: Retrofitting an Existing JavaServer Faces Application -
This solution focuses on how an exsiting JSF component or application may be AJAXified.
There are two separate entries which implement Strategy 1. These solutions are Autocomplete JSF Component and Progress-Bar JSF Component . Both examples have working component code and sample applications that showcase the components.
For more details on these strategies see: Using JavaServer Faces Technology with AJAX .
Please tell us what you think.