<?xml version='1.0' encoding='UTF-8'?>
<section>
  <sectioninfo>
    <keywordset>
      <keyword>rich:dataFilterSlider</keyword>
      <keyword>HtmldataFilterSlider</keyword>
    </keywordset>
  </sectioninfo>
  <table>
    <title>Component identification parameters </title>
    <tgroup cols="2">
      <thead>
        <row>
          <entry>Name</entry>
          <entry>Value</entry>
        </row>
      </thead>
      <tbody>
        <row>
          <entry>component-type</entry>
          <entry>org.richfaces.dataFilterSlider</entry>
        </row>
        <row>
          <entry>component-class</entry>
          <entry>org.richfaces.component.html.HtmlDataFilterSlider</entry>
        </row>
        <row>
          <entry>component-family</entry>
          <entry>org.richfaces.DataFilterSlider</entry>
        </row>
        <row>
          <entry>renderer-type</entry>
          <entry>org.richfaces.DataFilterSliderRenderer</entry>
        </row>
        <row>
          <entry>tag-class</entry>
          <entry>org.richfaces.taglib.dataFilterSliderTag</entry>
        </row>
      </tbody>
    </tgroup>
  </table>

  <section>
    <title>Creating the Component with a Page Tag</title>
    <para>Here is a simple example as it could be used on a page:</para>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="XML"><![CDATA[...
    <rich:dataFilterSlider sliderListener="#{mybean.doSlide}" startRange="0"
                                            endRange="50000" increment="10000" handleValue="1" />
...]]></programlisting>
  </section>
  <section>
    <title>Creating the Component Dynamically Using Java</title>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlDataFilterSlider; 	
...
HtmlDataFilterSlider mySlider = new HtmlDataFilterSlider();
...]]></programlisting>
  </section>
  <section>
    <title>Details of Usage</title>
    <para>The <emphasis role="bold">
        <property>dataFilterSlider</property>
      </emphasis> component is bound to some UIData component using a <emphasis>
        <property>&quot;for&quot;</property>
      </emphasis> attribute and filters data in a table. </para>
    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="XML"><![CDATA[...
    <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>
...]]></programlisting>
    <para>In this example other two attributes are used for filtering:</para>
    <itemizedlist>
      <listitem><para>
        <emphasis>
          <property>&quot;forValRef&quot;</property>
        </emphasis> is a string which is used in a value attribute of the target UIData component.
        It&apos;s designed for resetting the UIData component back to the original list provided
        by a backing bean. </para></listitem>
      <listitem><para>
        <emphasis>
          <property>&quot;filterBy&quot;</property>
        </emphasis> is a getter of an object member that is to be compared to a slider value.
        It&apos;s a value that is used in results filtering. </para></listitem>
    </itemizedlist>
    <para><emphasis>
        <property>&quot;handleValue&quot;</property>
      </emphasis> is an attribute for keeping the current handler position on the
        <property>dataFilterSlider</property> component. Based on the current value, appropriate
      values obtained from a getter method defined in <emphasis>
        <property>&quot;filterBy&quot;</property>
      </emphasis> are filtered.</para>
    <para>One more important attribute is a <emphasis>
        <property>&quot;storeResults&quot;</property>
      </emphasis> one that allows the <property>dataFilterSlider</property> component to keep UIData
      target object in session.</para>
    <para>If it&apos;s necessary the component submits a form on event of a handler state
      changing, use the <emphasis>
        <property>&quot;onSlide&quot;</property>
      </emphasis> attribute (<emphasis>
        <property>&quot;onChange&quot;</property>
      </emphasis> is its alias). When the attribute <code>definition = &quot;true&quot;</code>, submission on this event is
      defined.</para>
    <para>
      Information about the <emphasis><property>&quot;process&quot;</property></emphasis> attribute usage you can find in the<link linkend="process"> &quot;Decide what to process &quot; </link> guide section.
    </para>
  </section>
  <section>
    <title>Look-and-Feel Customization</title>
    <para>The <emphasis role="bold">
        <property>&lt;rich:dataFilterSlider&gt;</property>
      </emphasis> component has no skin parameters and special <emphasis>
        <property>style classes</property></emphasis>, 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&apos;s possible to use <emphasis>
        <property>&quot;style&quot;</property>
      </emphasis> and <emphasis>
        <property>&quot;styleClass&quot;</property>
      </emphasis> attributes on the component.</para>
  </section>
  <section>
    <title>Relevant Resources Links</title>
    <para>
      <ulink
        url="http://livedemo.exadel.com/richfaces-demo/richfaces/dataFilterSlider.jsf?c=dataFilterSlider"
        >On the component LiveDemo page</ulink> you can see the example of <emphasis role="bold">
        <property>&lt;rich:dataFilterSlider&gt;</property>
      </emphasis> usage and sources for the given example. </para>
  </section>

</section>
