RichFaces rich:progressBar

RichFaces Rich Progressbar with features, configuration, architecture, a4j:log, a4j:ajax, a4j:commandlink, a4j:outputpanel,rich:autocomplete, rich:fileupload, rich:list, rich:panel, rich:datascroller, rich:dropdownmenu, rich:messages, rich:progressbar, rich:tooltip etc.

RichFaces rich:progressBar

RichFaces rich:progressBar

It is used to display a progress bar to indicate the status of a process. It can update either through Ajax or on the client-side, and the look and feel can be fully customized.

It requires the value attribute which holds the current progress value. The progress bar becomes active and starts sending Ajax requests when the value is greater than or equal to the minimum value 0.

Style classes and skin parameters

The following table contains the Style classes and skin parameters for the progressBar.

Class Function Skin Parameters Mapped CSS properties
.rf-pb-lbl It is used to define styles for labels on the progress bar. No skin parameters.  
.rf-pb-prgs It is used to define styles for the progressed portion of the progress bar. panelBorderColor selectControlColor border-color background-color
.rf-pb-init, .rf-pb-fin These classes define styles for the initial state and finished state. generalTextColor generalFamilyFont generalSizeFont color font-family font-size


Here, in the following example, we are implementing <rich:progressBar> component. This example contains the following files.

JSF File

// progressbar.xhtml

  1. <ui:composition xmlns=""  
  2. xmlns:h=""  
  3. xmlns:a4j=""  
  4. xmlns:rich=""  
  5. xmlns:f=""  
  6. xmlns:ui="">  
  7. <f:view>  
  8. <h:head>  
  9. <title>Progress Bar </title>  
  10. </h:head>  
  11. <h:body>  
  12. <h:form>  
  13. <h:outputText value="Progress Bar" /><br/>  
  14. <rich:progressBar value="#{progressBar.increment_value}" />  
  15. </h:form>  
  16. </h:body>  
  17. </f:view>  
  18. </ui:composition>  

Managed Bean


  1. import javax.faces.bean.ManagedBean;  
  2. import javax.faces.bean.RequestScoped;  
  3. @ManagedBean  
  4. @RequestScoped  
  5. public class ProgressBar {  
  6. private int increment_value = 70;  
  7. public int getIncrement_value() {  
  8. return increment_value;  
  9. }  
  10. public void setIncrement_value(int increment_value) {  
  11. this.increment_value = increment_value;  
  12. }  
  13. }