How to Use the Auto-Complete Component

The autoComplete component allows users to do real time auto-completion using AJAX interactions.  The component uses managed beans to configure the advanced properties as well as the retrieve the resultant completion data.  The tag library for the autoComplete component can be accessed using the declaration:
    <%@taglib prefix="ui" uri="http://java.sun.com/blueprints/ui/14"%>

An example of the JSF autoComplete component's use is as follows:


       <ui:autoComplete size="40" maxlength="100" id="cityField" completionMethod="#{ApplicationBean.completeCity}"
               value="#{SessionBean.city}" required="true" ondisplay="function(item) { return extractCity(item); }"
               onchoose="function(item) { return chooseCity(item); }"/>


JSP Tag Attributes

The Rating component supports the following attributes.


© Sun Microsystems 2006. All of the material in The Java BluePrints Solutions Catalog is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.