<?xml version='1.0' encoding='UTF-8'?>
<section>

  <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 <property>dataFilterSlider</property> component is bound to some UIData component
      using a <emphasis>
        <property>&quot;for&quot;</property>
      </emphasis> attribute and filters data in this 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>
        <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. </listitem>
      <listitem>
        <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. </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 definition = true, submission on this event is
      defined.</para>
  </section>
  <section>
    <title>Relevant resources links</title>
    <para>
      <ulink
        url="http://livedemo.exadel.com/richfaces-demo/richfaces/dataFilterSlider.jsf?c=dataFilterSlider"
        >Here</ulink> you can see the example of <emphasis role="bold"
        >&lt;rich:dataFilterSlider&gt;</emphasis> usage and sources for the given example.
    </para>
  </section>

</section>
