|
|
JavaServer Faces and AJAX for Google Fans
|
04/18/2006, By Jonas Jacobi and John Fallows
|
Jonas Jacobi & John Fallows, the writers of the Ajax book Pro JSF and Ajax: Building Rich Internet Components has written a nice article explaining how to Ajax-enable data fetch for your JSF components using Mabon, and how you can package external resources needed for your JSF component into the same archive as your Java classes leveraging the Weblets project.
In this article they will show you how to use Mabon to create a simple and powerful input component with built-in suggest functionality similar to what Google Suggest provides.
To make it easy for application developers to use our JDJ InputSuggest component, we are going to use the Weblets open source project to bundle external resources, such as icons and JavaScript libraries, into a Java archive (JAR) that represents our JSF component bundle.
The JSF AJAX input suggest solution consists of four classes as shown below:
These classes are as follows:
The HtmlInputSuggest is the renderer-specific subclass.
The HtmlRenderer superclass provides some convenient methods for encoding resources.
The HtmlInputSuggestRenderer is your new custom Renderer, which is in charge of the markup rendered to the client, including resources needed such as JavaScript libraries and style sheets.
The HtmlInputSuggestTag is the tag handler.
Finally, after reading this article you will be able to create reusable rich Internet components with JSF and AJAX, This article will help you in creating your own custom components and build Rich Internet Applications (RIAs) with JSF.
Read Complete Article...
|
Rate this Ajax Articles
Rating: 7.5 out of 2 votes cast
| |
|
|
|
|
|
|
|
|
|
|
|
|