Create new RichFaces Documentation Jira issue

This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

6.6.5.  < rich:dataFilterSlider > available since 3.0.0

A slider-based action component is used for filtering table data.


Table 6.67. rich : dataFilterSlider attributes

Attribute Name Description
actionMethodBinding pointing at the application action to be invoked, if this UIComponent is activated by you, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property
actionListenerMethodBinding pointing at method accepting an ActionEvent with return type void
ajaxSingleLimits JSF tree processing (decoding, conversion, validation and model updating) only to a component that sends the request. Boolean
binding JSF: The attribute takes a value-binding expression for a component property of a backing bean
bypassUpdatesIf "true", after process validations phase it skips updates of model beans on a force render response. It can be used for validating components input
clientErrorMessageAn error message to use in client-side validation events
dataSerialized (on default with JSON) data passed on the client by a developer on AJAX request. It's accessible via "data.foo" syntax
endRangeA slider end point
eventsQueueName of requests queue to avoid send next request before complete other from same event. Can be used to reduce number of requests of frequently events (key press, mouse move etc.)
fieldStyleClassAssigns one or more space-separated CSS class names to the component input field. The value of the "manualInput" attribute must be "true".
filterByA getter of an object member required to compare a slider value to. This is a value that is used in results filtering
focusID of an element to set focus after request is completed on client side
forThe component using UIData (datatable id)
forValRefThis is a string which is used in a value attribute of the datatable. It is used for resetting the datatable back to the original list provided by a backing bean
handleStyleClassAssigns one or more space-separated CSS class names to the component handle
handleValueCurrent handle value
id JSF: Every component may have a unique id that is automatically created if omitted
ignoreDupResponsesAttribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is in a queue already. ignoreDupResponses="true" does not cancel the request while it is processed on the server, but just allows to avoid unnecessary updates on the client side if the response isn't actual now
immediateTrue means, that the default ActionListener should be executed immediately (i.e. during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase
incrementAmount to which a handle on each slide/move should be incremented
limitToListIf "true", then of all AJAX-rendered on the page components only those will be updated, which ID's are passed to the "reRender" attribute of the describable component. "false"-the default value-means that all components with ajaxRendered="true" will be updated.
manualInputFalse value for this attribute makes text field "read-only" and "hidden". Hence, the value can be changed only from a handle. Default value is "true"
onbeforedomupdateThe client-side script method to be called before DOM is updated
onchange DHTML: The client-side script method to be called when the component input field value is changed
onclick DHTML: The client-side script method to be called when the element is clicked
oncompleteThe client-side script method to be called after the request is completed
ondblclick DHTML: The client-side script method to be called when the element is double-clicked
onerrorThe client-side script method to be called whenever a JavaScript error occurs
oninputkeydownThe client-side script method to be called when a key is pressed down in the component input field
oninputkeypressThe client-side script method to be called when a key is pressed and released in the component input field
oninputkeyupThe client-side script method to be called when a key is released in the component input field
onkeydown DHTML: The client-side script method to be called when a key is pressed down over the element
onkeypress DHTML: The client-side script method to be called when a key is pressed over the element and released
onkeyup DHTML: The client-side script method to be called when a key is released
onmousedown DHTML: The client-side script method to be called when a mouse button is pressed down over the element
onmousemove DHTML: The client-side script method to be called when a pointer is moved within the element
onmouseout DHTML: The client-side script method to be called when a pointer is moved away from the element
onmouseover DHTML: The client-side script method to be called when a pointer is moved onto the element
onmouseup DHTML: The client-side script method to be called when a mouse button is released
onslideThe client-side script method to be called when a slider handle is moved
onSlideSubmitDEPRECATED (use submitOnSlide). If the slider value is changed, the form is submitted. Default value is "true".
processId['s] (in format of call UIComponent.findComponent()) of components, processed at the phases 2-5 in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection
rangeStyleClassAssigns one or more space-separated CSS class names to the background div element wrapping a full range
rendered JSF: If "false", this component is not rendered
requestDelayAttribute defines the time (in ms.) that the request will be wait in the queue before it is ready to send. When the delay time is over, the request will be sent to the server or removed if the newest 'similar' request is in a queue already
reRenderId['s] (in format of call UIComponent.findComponent()) of components, rendered in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection
similarityGroupingIdIf there are any component requests with identical IDs then these requests will be grouped.
sliderListenerMethodBinding representing an action listener method that will be notified after changing of slider control position
startRangeA slider begin point
statusID (in format of call UIComponent.findComponent()) of Request status component
storeResultsSpecifies if the component will store a UIData object (your table rows) in session
styleHTML: CSS style rules to be applied to the component
styleClass JSF: Assigns one or more space-separated CSS class names to the container surrounding the component. Corresponds to the HTML "class" attribute.
submitOnSlideIf the slider value is changed, the form is submitted. Default value is "true".
timeoutResponse waiting time on a particular request. If a response is not received during this time, the request is aborted
trackStyleClassAssigns one or more space-separated CSS class names to the component track
trailerIt shows or hides a trailer following a handle
trailerStyleClassAssigns one or more space-separated CSS class names to the trailer following the component handle
value JSF: The current value for this component
widthHTML: Width of the slider control. Default value is "200px".

Table 6.68. Component identification parameters

NameValue
component-typeorg.richfaces.dataFilterSlider
component-classorg.richfaces.component.html.HtmlDataFilterSlider
component-familyorg.richfaces.DataFilterSlider
renderer-typeorg.richfaces.DataFilterSliderRenderer
tag-classorg.richfaces.taglib.dataFilterSliderTag

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" />
...

Example:

import org.richfaces.component.html.HtmlDataFilterSlider;   

...
HtmlDataFilterSlider mySlider = new HtmlDataFilterSlider();
...

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:

"handleValue" is an attribute for keeping the current handle 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 handle state changing, use the "submitOnSlide" attribute. When the attribute definition is "true", submission on this event is defined.

Information about the "process" attribute usage you can find in the "Decide what to process " guide section.

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.

On the component LiveDemo page you can see the example of <rich:dataFilterSlider> usage and sources for the given example.