Javatpoint Logo
Javatpoint Logo

RichFaces <rich:select>

This component provides a drop-down list box for selecting a single value from multiple options. It is similar to the JSF UISelectOne component.

We can use it in an auto-completing mode, where the values in the drop-down list are provided dynamically using either the autocompleteMethod or autocompleteList attributes.

Style classes and skin parameters

The following table contains the style classes and corresponding skin parameters for the select.

Class Function Skin Parameters Mapped CSS properties
.rf-sel It is used to define styles for the select control itself. No skin parameters.
.rf-sel-cntr It is used to define styles for the container of the select control. panelBorderColor border-color
.rf-sel-inp It is used to define styles for the select control input field. controlBackgroundColor background-color
.rf-sel-fld-err It is used to define styles for the input field when an error occurs. No skin parameters.
.rf-sel-opt It is used to define styles for an option in the select control. generalTextColor generalSizeFont color font-size
.rf-sel-sel It is used to define styles for the selected option of the select control. generalTextColor border-color
.rf-sel-dflt-lbl It is used to define styles for the default label of the select control. No skin parameters.
.rf-sel-btn It is used to define styles for the button of the select control. headerBackgroundColor background-color
.rf-sel-btn-arrow It is used to define styles for the arrow on the button. No skin parameters.
.rf-sel-btn-dis It is used to define styles for the button of the select control when it is disabled. No skin parameters.
.rf-sel-lst-scrl It is used to define styles for the list scrollbar. No skin parameters.
.rf-sel-shdw It is used to define styles for the select control shadow. No skin parameters.
.rf-sel-shdw-t, .rf-sel-shdw-b, .rf-sel-shdw-l, .rf-sel-shdw-r These classes define the top, bottom, left, and right edge of the select control shadows. No skin parameters.

Example

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

JSF File

// rich-select.xhtml

Managed Bean

// Country.java

Output:

RichFaces Select 1




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA