How to Use the Rating Component

The Rating JSF component that was created by Matthew Bohm allows users to rate items and have the model updated through an AJAX call.  The component uses a managed bean to configure the advanced properties as well as the resultant user rating selection.  The tag library for the Rating component can be accessed using the declaration:
    <%@taglib prefix="ui" uri="http://java.sun.com/blueprints/ui/14"%>
An example of the JSF Rating component's use is as follows:
   <ui:rating id="rating" maxGrade="5" includeNotInterested="true" includeClear="true" 
hoverTexts="#{RatingBean.ratingText}" notInterestedHoverText="Not Interested"
clearHoverText="Clear Rating" grade="#{RatingBean.grade}"/>

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.