PrimeFaces Steps

This components is an indicator for the steps in a workflow. It indicates that at what step we are right now. It is used to show current step in multi-steps application.

The <p:steps> component is used to create steps indicator in the JSF application. It has various important attributes that are tabled below.

Steps Attributes

AttributeDefault valueTypeDescription
idnullStringIt is a unique identifier of the component.
renderedtrueBooleanIt takes boolean value to specify the rendering of the component.
modelnullMenuModelIt is used to build menu dynamically.
stylenullStringIt is used to set inline style of the component.
activeIndex0IntegerIt is an index of the active tab.
widgetVarnullStringIt is used to set name of the client side widget.
readonlytrueBooleanIt is used to make component readonly.

Skinning

Following is the table of structural style classes.

Style ClassApplies
.ui-stepsIt applies on main container element.
.ui-steps-itemIt applies on step element.
.ui-steps-nameIt applies on name of the step.
.ui-steps-itemThis class is used for number of the step.

Example

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

JSF File

// steps.xhtml

Output:

PrimeFaces Steps 1

If we change activeIndex = 3, it produces the following output.

PrimeFaces Steps 2