rich:dataFilterSlider HtmldataFilterSlider

Component identification parameters

Name | Value
--- | ---
component-type | org.richfaces.dataFilterSlider
component-class | org.richfaces.component.html.HtmlDataFilterSlider
component-family | org.richfaces.DataFilterSlider
renderer-type | org.richfaces.DataFilterSliderRenderer
tag-class | org.richfaces.taglib.dataFilterSliderTag

## Creating the Component with a Page Tag

Here is a simple example as it could be used on a page:

Example:

    ...
        <rich:dataFilterSlider sliderListener="#{mybean.doSlide}" startRange="0"
                                                endRange="50000" increment="10000" handleValue="1" />
    ...

## Creating the Component Dynamically Using Java

Example:

    import org.richfaces.component.html.HtmlDataFilterSlider;
    ...
    HtmlDataFilterSlider mySlider = new HtmlDataFilterSlider();
    ...

## Details of Usage

The dataFilterSlider component is bound to some UIData component using a "for" attribute and filters data in a table.

Example:

    ...
        <rich:dataFilterSlider sliderListener="#{mybean.doSlide}"
                            startRange="0"
                            endRange="50000"
                            increment="10000"
                            handleValue="1"
                            for="carIndex"
                            forValRef="inventoryList.carInventory"
                            filterBy="getMileage"
        />
    ...
        <h:dataTable id="carIndex">
            ...
        </h:dataTable>
    ...

In this example other two attributes are used for filtering:

- "forValRef" is a string which is used in a value attribute of the target UIData component. It's designed for resetting the UIData component back to the original list provided by a backing bean.
- "filterBy" is a getter of an object member that is to be compared to a slider value. It's a value that is used in results filtering.

"handleValue" is an attribute for keeping the current handler position on the dataFilterSlider component. Based on the current value, appropriate values obtained from a getter method defined in "filterBy" are filtered.

One more important attribute is a "storeResults" one that allows the dataFilterSlider component to keep UIData target object in session.

If it's necessary the component submits a form on event of a handler state changing, use the "onSlide" attribute ( "onChange" is its alias). When the attribute definition = true, submission on this event is defined.

## Look-and-Feel Customization

The <rich:dataFilterSlider> component has no skin parameters and special style classes, as it consists of one element generated with a your method on the server. To define some style properties such as an indent or a border, it's possible to use "style" and "styleClass" attributes on the component.

## Relevant Resources Links

Here you can see the example of <rich:dataFilterSlider> usage and sources for the given example.