How to Use the Progress Bar Component

The Progress Bar JSF component that was created by Matthew Bohm allows users to display the progress of a lengthy task in-screen.  The progress percentage is updated through an AJAX call to a manage bean.  The component also facilitates a call back to a Javascript function once the task is complete.  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 progressBar component's use is as follows:                   
 <ui:progressBar id="progressBar" interval="1000" 
onComplete="progressComplete" startOperation="#{ProgressBarBean.startTask}"
percentage="#{ProgressBarBean.percentage}" style="width: 400px"/>

JSP Tag Attributes

The Rating component supports the following attributes.

CSS Overrides

If you would like to override the look of the progress bar, the class names that are used by the progress bar can be configured.  For example:

        <style>
            .bpui_progressbar_barAreaContainer {
                border-style: groove !important;
                border-width: medium !important;
            }
   
            .bpui_progressbar_portionComplete {
                background: #FF0000 !important;
            }

            .bpui_progressbar_portionRemaining {
                background: lightgrey !important;
            }   
        </style>  


Java BluePrints | Sun Microsystems © 2007 Sun Microsystems Inc. All rights reserved. Use is subject to license terms.