<?xml version='1.0' encoding='UTF-8'?>
<chapter id="FAQ" xreflabel="FAQ">
        <?dbhtml filename="FAQ.html"?>
        <sectioninfo>
                <keywordset>
                        <keyword>RichFaces</keyword>
                </keywordset>
        </sectioninfo>
        <title>FAQ</title>

        <section>
                <?dbhtml filename="Wherearebinary/sourcedistributionforRichFacesrelease.html"?>
                <title>Where are binary/source distribution for RichFaces 3.1.0 release?</title>
                <para> Most important links for RichFaces can be found on <ulink
                        url="http://www.jboss.org/index.html?module=bb&op=viewtopic&t=104575"
                                >RichFaces project page</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="HowtobuildRichFacessnapshotmanually.html"?>
                <title>How to build RichFaces snapshot manually?</title>
                <para>This <ulink
                                url="http://labs.jboss.com/wiki/HowToBuildRichFacesSnapshotManually"
                                > wiki article</ulink> helps you to find an answer.</para>
        </section>

        <section>
                <?dbhtml filename="WhatstructureofRichFacesSVNrepositoryis.html"?>
                <title>What is the structure of RichFaces SVN repository?</title>
                <para>RichFaces repository structure overview can be found in the wiki article<ulink
                                url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview"
                        >RichFaces Repository Structure Overview"</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="Howtobuildrichfaces-samplesapplications.html"?>
                <title>How to build richfaces-samples applications?</title>
                <para>How to build and how to use richfaces-samples applications in Eclipse is
                        described in the wiki article<ulink
                                url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview"
                                >RichFaces Repository Structure Overview"</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="HowtouseSkinnability.html"?>
                <title>How to use Skinnability?</title>
                <para>Here is an <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=111143"
                                >article</ulink>  that explains the Skinnability basics.</para>
                <para> For information you can also see discussion about this problem on the <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=103772"
                                >RichFaces Users Forum</ulink></para>
                <para>Also, the effect of predefined skins on the application whole look-and-feel
                        could be seen on <ulink url="http://livedemo.exadel.com/richfaces-demo/"
                        >RichFaces Live Demo page</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="Whythereisaproblemwithprototypes.html"?>
                <title>Why does a problem with prototypes in RichFaces 3.1.0 happen? The
                        Prototype.Browser() function can&apos;t be found.</title>
                <para>RichFaces 3.1.0 has been released with the latest Prototype 1.5.1.1. The
                        conflict happens because on your page an older version of prototypes that
                        can be added from Tomahawk 1.1.6 is used. See the solution to the problem
                                <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=118526&amp;postdays=0&amp;postorder=asc&amp;start=0"
                                >RichFaces forum.</ulink></para>
        </section>

        <section>
                <?dbhtml filename="WhyRichFaceslibrarycondataTablecomp.html"?>
                <title>Why RichFaces library contains &lt;rich:dataTable&gt; component,
                        though there is the standard &lt;h:dataTable&gt;?</title>
                <para>The article about <emphasis role="bold"
                        >&lt;rich:dataTable&gt;</emphasis> flexibility can be found in the <ulink
                                url="http://labs.jboss.com/wiki/RichFacesArticleDataTable"
                                >article about dataTable</ulink>.</para>
                <para>Source code (SVN) could be found in the <ulink
                                url="http://anonsvn.jboss.org/repos/richfaces/trunk/samples/richfaces-art-datatable/"
                                >RichFaces repository</ulink>.</para>
                <para> Online demo for a Web application is available on <ulink
                                url=" http://livedemo.exadel.com/richfaces-art-datatable/"
                        >RichFaces Live Demo page</ulink>.</para>
        </section>

        <section id="Organizewizards">
                <?dbhtml filename="Organizewizards.html"?>
                <title>How to organize wizards using the &lt;rich:modalPanel&gt; component?</title>
                <para>It&apos;s necessary to put <emphasis role="bold"
                                >&lt;a4j:include&gt;</emphasis> inside the <emphasis
                                role="bold">&lt;rich:modalPanel&gt;</emphasis> and perform
                        navigation inside it, as it&apos;s shown in the example below:</para>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[...
        <f:verbatim>
                <a href="javascript:Richfaces.showModalPanel('_panel',{left:'auto', top:'auto'})">Show Modal Panel</a>
        </f:verbatim>
        <rich:modalPanel id="_panel">
                <a4j:outputPanel id="view" >
                        <a4j:include viewId="/pages/included1.xhtml"></a4j:include>
                </a4j:outputPanel>
        </rich:modalPanel>
...

faces-config.xml:
...

        <navigation-rule>
                <from-view-id>/pages/included1.xhtml</from-view-id>
                <navigation-case>
                        <from-outcome>included2</from-outcome>
                        <to-view-id>/pages/included2.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
...

included1.xhtml:
...
        <h:form>
                <h:outputText value="Go to the step 2"/>
                <a4j:commandButton value="next" action="included2" reRender="view"/>
        </h:form>
...

included2.xhtml

...
        <h:form>
                <h:outputText value="Close window"/>
                <h:commandButton type="button" value="Close" onclick="javascript:Richfaces.hideModalPanel('_panel')"/>
        </h:form>
...

]]></programlisting>
                <para>The discussion about <emphasis role="bold"
                        >&lt;a4j:include&gt;</emphasis> and navigation rules can be found on
                        the <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4062036#4062036"
                                >Ajax Users Forum</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="Howtopreventmodalpanelfromclosure.html"?>
                <title>How to prevent modalPanel from closing when the validation inside fails?</title>
                <para>Examples of validation in <emphasis role="bold"
                                >&lt;rich:modalPanel&gt;</emphasis> could be found in the
                                <ulink url="http://labs.jboss.com/wiki/ModalPanelValidation">Wiki
                                article</ulink> and on the <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4061517"
                                >RichFaces Users Forum</ulink>. </para>
        </section>

        <section>
                <?dbhtml filename="HowtousesuggestionBox.html"?>
                <title>Why when I use suggestionBox inside the modalPanel content the popup
                        suggestion list doesn&apos;t show since it is behind the modalPanel.</title>
                <para>To solve this problem you should use the latest versions of RichFaces.</para>
                <para> Most important links for RichFaces can be found on <ulink
                                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=104575"
                                >RichFaces project page</ulink>.</para>

        </section>

        <section>
                <?dbhtml filename="DoesRichFacesworkwithfacelets.html"?>
                <title>Does RichFaces work with facelets?</title>
                <para>Main <ulink url="http://livedemo.exadel.com/richfaces-demo/"> demo</ulink> of
                        RichFaces is a facelets based application. Full Facelets support is one of
                        the main features. Hence, the answer is yes.</para>
        </section>

        <section>
                <?dbhtml filename="Isitpossibletocreatedynamicmenu.html"?>
                <title>Is it possible to create dynamic menu using &lt;rich:dropDownMenu&gt;
                        component?</title>
                <para><emphasis role="bold">&lt;rich:dropDownMenu&gt;</emphasis> is a
                        standard JSF component. Thus, creation of the menu dynamically from the Java
                        Script code is the same as for any other jsf component.</para>
                <para>For more information follow the <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=110983"
                                >link</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="Isitpossibletocustomizelookofdatascroller.html"?>
                <title>Is it possible to customize the look of dataScroller (the forward/back
                        buttons) and replace them with an images?</title>
                <para>The answer is yes. </para>
                <para>Component provides two controllers groups for switching:</para>
                <itemizedlist>
                        <listitem><para>Page numbers for switching onto a particular page</para></listitem>
                        <listitem><para>The controls of fast switching: &quot;first&quot;,
                                &quot;last&quot;, &quot;next&quot;,
                                &quot;previous&quot;, &quot;fastforward&quot;,
                                &quot;fastrewind&quot;</para></listitem>
                </itemizedlist>
                <para>The controls of fast switching are created adding the facets component with
                        the corresponding name:</para>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[ ...
    <rich:datascroller for="table" maxPages="10">
        <f:facet name="first">
            <h:outputText value="First"/>
        </f:facet>
        <f:facet name="last">
            <h:outputText value="Last"/>
        </f:facet>
    </rich:datascroller>
...
]]></programlisting>
                <para> There are also facets used to create the disabled states:
                        &quot;first_disabled&quot;, &quot;last_disabled&quot;,
                        &quot;next_disabled&quot;, &quot;previous_disabled&quot;,
                        &quot;fastforward_disabled&quot;,
                        &quot;fastrewind_disabled&quot;. </para>
        </section>

        <section>
                <?dbhtml filename="Howtoredirecttoanotherpage.html"?>
                <title>How to place simple links inside menu?</title>
                <para>If you want to navigate outside, when application uses an external URL, you
                        should use the following approach:</para>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[...
        <rich:dropDownMenu> 
        ...
                <rich:menuItem submitMode="none" 
                                onclick="document.location.href='http://labs.jboss.com/jbossrichfaces/'">
                        <h:outputLink value="http://labs.jboss.com/jbossrichfaces/">
                                        <h:outputText value="RichFaces Home Page"></h:outputText>
                        </h:outputLink>
                </rich:menuItem>
        ...
        </rich:dropDownMenu>
...
]]></programlisting>
                <para>Also online demo <emphasis role="bold"
                        >&lt;rich:dropDownMenu&gt;</emphasis> component is available on<ulink
                                url="http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf"
                                >RichFaces Live Demo page</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="CanthedropDownMenubeincludedintreenodes.html"?>
                <title>Can I use dropDownMenu as context menu?</title>
                <para>The <emphasis role="bold">&lt;rich:dropDownMenu&gt;</emphasis> is
                        designed keeping in mind that it should not be used for a contextMenu
                        purpose. We have a <emphasis role="bold"
                        >&lt;rich:contextMenu&gt;</emphasis> component in the TODO list.
                        However, it is not schedule for the nearest versions.</para>
        </section>

        <section>
                <?dbhtml filename="HowtocustomizesimpleTogglePanel.html"?>
                <title>How to pass own parameters during a modalPanel opening or closing?</title>
                <para>The answer could be found in the &quot;Details of usage&quot; of <link
                                linkend="modalPanel">&lt;rich:modalPanel&gt;
                        component</link>.</para>
        </section>

        <section>
                <?dbhtml filename="Howtoaddalinktothetreenode.html"?>
                <title>How to add a simple link to the tree node?</title>
                <para>Simple code is placed below:</para>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[...
        <rich:tree ...> 
                ...
                <rich:treeNode submitMode="none" 
                                                onclick="document.location.href='http://labs.jboss.com/jbossrichfaces/'">
                        <h:outputLink value="http://labs.jboss.com/jbossrichfaces/">
                                <h:outputText value="RichFaces Home Page"></h:outputText>
                        </h:outputLink>
                </rich:treeNode>
                ...
</rich:tree ...> 
...
]]></programlisting>
        </section>

        <section>
                <?dbhtml filename="Isitpossibletoplacetabsvertically.html"?>
                <title>Is it possible to place tabs upright in the tabPanel?</title>
                <para>It&apos;s not possible to place tabs upright in the tabPanel. For this
                        purporse use togglePanel. Toggle controls can be placed anywhere in the
                        layout.</para>
        </section>

        <section>
                <?dbhtml filename="HowtogetaacommandButton.html"?>
                <title>How to get a commandButton working within the modalPanel?</title>
                <para>Simple code is placed below:</para>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[...
        <rich:modalPanel> 
                <f:facet name="header"> 
                        <h:outputText value="Test" /> 
                </f:facet> 
                <f:facet name="controls"> 
                        <h:commandLink value="Close" style="cursor:pointer" onclick="Richfaces.hideModalPanel('mp')" /> 
                </f:facet> 
                <h:form> 
                        <t:commandButton value="Test" action="#{TESTCONTROLLER.test}" /> 
                </h:form> 
        </rich:modalPanel>
...
]]></programlisting>
                <para>
                        <note>
                                <title>Note:</title><para>Two rules are important for modalPanel: </para><itemizedlist>
                                        <listitem><para>modalPanel must have its own form if it has form
                                                elements (input or/and command components) inside
                                                (as it was shown in the example above) </para></listitem>
                                        <listitem><para>modalPanel must not be included into the form (on
                                                any level up) if it has the form inside.</para></listitem>
                                </itemizedlist></note>
                </para>
        </section>

        <section>
                <?dbhtml filename="Howtodefinecurrentselectedtab.html"?>
                <title>How to define the currently selected tab?</title>
                <para> Simple code is placed below:</para>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[...
        <rich:tabPanel selectedTab="t2">
                <rich:tab label="tab 1" name="t1">
                        <h:outputText value="tab 1" />
                </rich:tab>
                <rich:tab label="tab 1"  name="t2">
                        <h:outputText value="tab 2" />
                </rich:tab>
                <rich:tab label="tab 1"  name="t3">
                        <h:outputText value="tab 3" />
                </rich:tab>
        </rich:tabPanel>
...
]]></programlisting>
        </section>

        <section>
                <?dbhtml filename="Howtoremembercurrentselectedtab.html"?>
                <title>How to remember the current selected tab?</title>
                <para> For necessary information you can see discussion about this problem on the
                                <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=111761"
                                >RichFaces Users Forum</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="Howtonavigatefromonetabtoanother.html"?>
                <title>How to navigate from one tab to another using buttons (apart from tabPanel
                        functionality)?</title>
                <para> For necessary information you can see <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4085931#4085931"
                                >RichFaces Users Forum</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="Howtoretrievethecurrentvalue.html"?>
                <title>How to retrieve the current value from the inputNumberSlider?</title>
                <para>To catch the value of the inputNumberSlider from the JavaScrip, use the
                        following approach:</para>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[...
        <rich:inputNumberSlider width="500" step="20" 
                                onchange="someFunctionCall(this.input.value)"
                                minValue="0"
                                maxValue="500"
                                value="0"
                                showInput="false"
                                showToolTip="false"
                                showBoundaryValues="false"/>	
        ...
        <script>
                function someFunctionCall(value) {
                         alert(value);
                }
        </script>
...
]]></programlisting>
        </section>

        <section>
                <?dbhtml filename="Howtoapplyskins.html"?>
                <title>How to apply skins to the standard input components?</title>
                <para>The answer could be found <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=103494"
                                >RichFaces forum</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="Isthereawaytocapturetherowdata.html"?>
                <title>Is there a way to capture the rowdata of dataTable and subTable?</title>
                <para> For necessary information you can see discussion about this problem on the
                                <ulink
                                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=111965"
                                >RichFaces Users Forum</ulink></para>
        </section>

        <section>
                <?dbhtml filename="Isitpossibletouse thedatascroller.html"?>
                <title>Is it possible to use datascroller without its table border and styles (to
                        show only links)?</title>
                <para> It&apos; necessary to redefine rich* classes for example like this:</para>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="JAVA"><![CDATA[.rich-datascr-button { 
border: 0px; 
} 
.rich-dtascroller-table { 
border: 0px; 
} 
.rich-datascr-button { 
background-color: transparent; 
}]]></programlisting>
        </section>

        <section>
                <?dbhtml filename="subTableincombinationwithdataTable.html"?>
                <title>How to use subTable in combination with dataTable?</title>
                <para>The answer could be found in <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4059044#4059044"
                                >RichFaces forum</ulink>.</para>
        </section>

        <section id="Truepagination">
                <?dbhtml filename="Howtodotruepagination.html"?>
                <title>How to do correct pagination using datascroller (load a part of data from
                        database)?</title>
                <para>The answer could be found on the <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4060199#4060199"
                                >RichFaces Users Forum</ulink>.</para>
                <para>How to use <emphasis role="bold">&lt;rich:dataTable&gt;</emphasis> and
                                <emphasis role="bold">&lt;rich:dataScroller&gt;</emphasis>
                        in a context of Extended Data Model see <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=115636"
                                >here</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="Howtomakehtmlscrollbars.html"?>
                <title>How to make html scrollbars in modalPanel?</title>
                <para>The answer could be found on the RichFaces Users Forum:</para>
                <itemizedlist>
                        <listitem><para>
                                <ulink
                                        url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4062877#4062877"
                                        >http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4062877#4062877</ulink>
                        </para></listitem>
                        <listitem><para>
                                <ulink
                                        url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=105412"
                                        >http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=105412</ulink>
                        </para></listitem>
                </itemizedlist>

        </section>

        <section>
                <?dbhtml filename="HowtoExpand/CollapseTreeNodesfromcode.html"?>
                <title>How to expand/collapse tree nodes from code?</title>
                <para>The answer could be found <ulink
                                url="http://labs.jboss.com/wiki/ExpandCollapseTreeNodes"
                        >here</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="HowtouseJavaScriptAPI.html"?>
                <title>How to use JavaScript API?</title>
                <para>The simple code is placed below:</para>
                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[...
         <a4j:form id="form">
                <h:panelGroup id="test" columns="2" style="width: 300px">
                        <h:selectBooleanCheckbox value="#{bean.check}">
                                <a4j:support event="onchange" reRender="test" />
                                <f:selectItem itemValue="true" itemLabel="Show" />
                                <f:selectItem itemValue="false" itemLabel="Hide" />
                        </h:selectBooleanCheckbox>
                        <rich:calendar popup="true"
                                        rendered="#{!bean.check}" value="#{bean.date}" id="c"/>
                                <a onclick="$('form:c').component.doExpand()" href="#">Show</a>	
                </h:panelGroup>
        </a4j:form>
...
]]></programlisting>
        </section>

        <section>
                <?dbhtml filename="HowtoloadtheScriptaculouslibrary.html"?>
                <title>How to load the Scriptaculous library?</title>
                <para>To load the whole Scriptaculous library shipped with RichFaces use <emphasis
                                role="bold">&lt;a4j:loadScript&gt;</emphasis> tag.</para>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[...
<a4j:loadScript src="resource://scriptaculous.js" />
...
]]></programlisting>
                <para> Thus, this command allows loading an integrated version of the library that
                        includes all existing scriptaculous files except unittest.js. </para>
                <para> If you don&apos;t want to load the whole library, but only the particular
                        file, for example, effect.js, use the following line: </para>
                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[...
<a4j:loadScript src="resource://scriptaculous/effect.js" />
...
]]></programlisting>
                <para> Remember, it does not make sense to load the particular file if you already
                        load the whole version. </para>

                <para>For more information see <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=119044"
                                >RichFaces Users Forum</ulink>.</para>
        </section>

        <section>
                <?dbhtml filename="Howtosaveeffectstatus.html"?>
                <title>How to save &lt;rich:effect&gt; status?</title>
                <para><emphasis role="bold">&lt;rich:effect&gt;</emphasis> component has
                        several callback methods such as beforeStart, afterFinish. You can use them
                        to save the status.</para>
                <para> See also <ulink
                                url="http://wiki.script.aculo.us/scriptaculous/show/CoreEffects"
                                >core effects</ulink> in scriptaculous.</para>
        </section>

        <section>
                <?dbhtml filename="Howtosaveeffectstatus.html"?>
                <title>How to send an additional parameter to server working with
                        &lt;rich:suggestionbox&gt;?</title>
                <para>An example is placed below:</para>
                <programlisting role="XML"><![CDATA[...
                <rich:suggestionbox width="200" height="200" for="test" suggestionAction="#{bean.autocomplete}" var="cap">
                        <h:column> 
                                <f:facet name="header">
                                        <h:outputText value="Sometext"></h:outputText>
                                </f:facet>
                                <h:outputText value="#{cap.text}"></h:outputText>
                        </h:column>
                        <a4j:support event="onselect" action="#{bean.action}">
                                <f:setPropertyActionListener value="#{cap.label}" target="#{bean.property1}" />
                        </a4j:support>
                </rich:suggestionbox>
...
]]></programlisting>
                <para>In the example <property>&quot;onselect&quot;</property> event is used
                        for sending selected value to the server. It&apos;s also possible to
                        pass additional fields of selected object (which don&apos;t belong to <emphasis>
                                <property>&quot;fetchvalue&quot;</property>
                        </emphasis> attribute.)</para>
        </section>

        <section>
                <?dbhtml filename="Howtosetrich:dataTableborder.html"?>
                <title>How to set &lt;rich:dataTable&gt; border to 0px?</title>
                <para>Add the following code to your css file:</para>
                <programlisting role="CSS"><![CDATA[...
                .rich-table, .rich-table-header,.rich-table-headercell, .rich-table-cell,
                        .rich-subtable-cell, .rich-table-footercell, .rich-subtable-footercell {
                                border-width:0px;
                }
...
]]></programlisting>
        </section>

        <section>
                <?dbhtml filename="Howtosetrich:dataTableborder.html"?>
                <title>How to create &lt;rich:suggestionBox&gt; dynamically?</title>
                <para>This is a working example:</para>
                <programlisting role="JAVA"><![CDATA[...
                org.apache.myfaces.component.html.ext.HtmlInputText searchBox = new org.apache.myfaces.component.html.ext.HtmlInputText();
        searchBox.setId( "inputQuery" );
        bar.getChildren().add( searchBox );

        org.richfaces.component.html.HtmlSuggestionBox suggestions = new org.richfaces.component.html.HtmlSuggestionBox();
        suggestions.setId( "sugg" );
        suggestions.setFor( "inputQuery" );
        suggestions.setTokens( ",[" );
        suggestions.setRules( "none" );

        javax.faces.el.MethodBinding mb = app.createMethodBinding( "#{suggestionBox.autocomplete}", new Class[] { Object.class } );
        suggestions.setSuggestionAction( mb );
        suggestions.setVar( "result" );

        suggestions.setRows( 0 );
        suggestions.setFirst( 0 );
        suggestions.setMinChars( "#{suggestionBox.minchars}" );
        suggestions.setShadowOpacity( "4" );
        suggestions.setBorder( "1" );
        suggestions.setWidth( "200" );
        suggestions.setHeight( "150" );
        suggestions.setShadowDepth( "4" );
        suggestions.setCellpadding( "2" );

            org.apache.myfaces.custom.column.HtmlSimpleColumn column = new org.apache.myfaces.custom.column.HtmlSimpleColumn();
                column.setId( "col1" );
                org.apache.myfaces.component.html.ext.HtmlOutputText text = new org.apache.myfaces.component.html.ext.HtmlOutputText();
                text.setId( "text1" );

                javax.faces.el.ValueBinding vb = app.createValueBinding( "#{result.text}" );
                text.setValueBinding( "value", vb );
                column.getChildren().add( text );
            suggestions.getChildren().add( column );
        bar.getChildren().add( suggestions );
...
]]></programlisting>
                <para> See also <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4099047#4099047"
                                >RichFaces User Forum</ulink>.</para>
        </section>



        <section id="DecidingWhatToChangeOnTheServerSide">
                <?dbhtml filename="DecidingWhatToChangeOnTheServerSide.html"?>
                <title>What should I change on the server side?</title>
                <para> As it was mentioned <ulink url="index.html#DecideWhatToChange"
                        >before</ulink>, the list of zones to be reRendered can be specified as EL
                        expression. But there is a question that must be specified more exactly. </para>
                <para> The list of Ids is formed during beforePhase of RENDER_RESPONSE. Therefore,
                        in this case one can point reRender to the Set type Bean&apos;s property
                        and fill the Set during a tracking request. </para>
                <para> It&apos;s the way to form a list of updatable areas dynamically. </para>
        </section>
        <section id="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute">
                <?dbhtml filename="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute.html"?>

                <title>How to check sending request conditions? Custom JavaScript before request
                        &quot;OnSubmit&quot; attribute.</title>
                <para> To check on the client some terms of request sending, the <emphasis>
                                <property>&quot;onSubmit</property>
                        </emphasis>&quot; attribute is added to all components, which may cause
                        the request. </para>
                <para>
                        <emphasis role="bold">Example: </emphasis>
                </para>
                <programlisting role="XML"><![CDATA[<h:inputText id="i" value="#{beanText.kennung}">
            <a4j:support event="onfocus" onsubmit="doSomething();" reRender="panelToReRender"/>
</h:inputText>]]></programlisting>
                <para> So in this case
                                &quot;<emphasis><property>doSomething()</property>&quot;</emphasis>
                        function is executed before the Ajax request. </para>
                <para> Besides, if this function returns &quot;false&quot;, Ajax request
                        isn&apos;t fired. </para>
                <note>
                        <title>Note:</title>
                        <para>Behavior of our <emphasis>
                                        <property>&quot;onsubmit&quot;</property>
                                </emphasis>slightly differs from the standard one. Do not return <emphasis>
                                        <property>&quot;true&quot;</property>
                                </emphasis> if you want to fire the request - because <emphasis
                                        role="bold">
                                        <property>&lt;xxx&gt;&lt;a4j:support
                                                event=&quot;onclick&quot;
                                                onsubmit=&quot;return
                                        true;&quot;&gt;</property>
                                </emphasis> is transformed into &lt;xxx onclick=&quot;return
                                true; A4J.Submit(.... );&quot; &gt; and the request
                                isn&apos;t fired also in this case (but the standard event
                                processing fired). You must only return <emphasis>
                                        <property>&quot;false&quot;</property>
                                </emphasis> if your conditions weren&apos;t completed or perform
                                some actions (if needed) without any returns in case you need to
                                fire it. </para>
                </note>
        </section>
        <section id="onCompleteAttribute.DifferencesAfterRelease1.0">
                <?dbhtml filename="onCompleteAttribute.DifferencesAfterRelease1.0.html"?>
                <title> What is differences of &quot;onCompelete&quot; attribute after
                        release 1.0?</title>
                <para> To avoid differences with other JavaScript attributes, a function placement
                        in a JavaScript call is changed, instead of simple inserting of attribute
                        content (..oncomplete :anotherFunction(this)..), it places (oncomplete:
                        function(){anotherFunction(this);}..) in anonymous function, to allow put
                        &quot;chain&quot; of statements in attribute. </para>
                <para> Since, <emphasis>
                                <property>&quot;this&quot;</property>
                        </emphasis> keyword will point to a parameters map instead of a control
                        element as it was before. You may use <emphasis>
                                <property>document.findElementById()</property>
                        </emphasis>to get references to this object after a request is processed as
                        when a page is updated in Ajax you will have reference to a control, removed
                        from a DOM tree. </para>
                <para> Or, if you are sure that your element is not updated, you can add <emphasis>
                                <property>&quot;onsubmit&quot;</property>
                        </emphasis> in <emphasis role="bold">
                                <property>&lt;a4j:support&gt;</property>
                        </emphasis> (or onclick in <emphasis role="bold">
                                <property>&lt;a4j:commandLink/Button&gt;</property>
                        </emphasis>) to place reference to known variable (<emphasis role="bold">
                                <property>&lt;a4j:commandLink onclick="var myControl=this;"
                                        oncomplete="anotherFunction(myControl)"/&gt;</property>
                        </emphasis>). </para>
                <important>
                        <title>New:</title>
                        <para> The onComplete syntax now is: </para>
                        <programlisting role="XML">
	<![CDATA[<someAjaxActionComponent ...oncomplete="myFunc(req,event,data)".../>]]>
            </programlisting>
                        <para> where the <property>event</property> is a variable where the JS event
                                copy that fires the request is placed into. One may use it to get
                                the element instead of this. and <property>data</property> is a
                                variable that contains deserialized value from the
                                <property>data</property> attribute. </para>
                </important>
        </section>
        <section id="InvokeOnComponentUsingWithJSF1.2">
                <?dbhtml filename="InvokeOnComponentUsingWithJSF1.2.html"?>
                <title>Is it possible to use InvokeOnComponent with JSF 1.2?</title>
                <para> RichFaces currently does not use <emphasis>invokeOnComponent</emphasis>
                        because of the 2 reasons: </para>
                <itemizedlist>
                        <listitem><para> Compatibility with JSF 1.1 and MyFaces applications is kept, due
                                to a big amount of code used in corporate applications. </para></listitem>
                        <listitem><para>
                                <emphasis> InvokeOnComponent</emphasis> works with already known
                                clientId, and works fine for communication between widget and backed
                                component, or updates content of already rendered component. But
                                there are some troubles to use this method for more complex
                                use-cases implemented in RichFaces, as there is a choice for
                                updatable components in application logic, where it&apos;s
                                necessary to navigate in a components tree by the native id, with
                                        <property>findComponent()</property> methods. </para></listitem>
                </itemizedlist>
                <para> Thus, for example, only entire dataTable can be updated in response (but all
                        Ajax core action components inside table work properly). </para>
        </section>
        <!--<section id="RegionsInDataTables">
      <?dbhtml filename="RegionsInDataTables.html"?>
    <title>Regions in Data Tables</title>
    <para>The regions in Data Tables aren&apos;t supported now, but the feature will be implemented in a new Ajax4jsf version for JSF 1.2.</para>
  </section>-->
        <section id="keepAliveComponentGeneratesException">
                <?dbhtml filename="keepAliveComponentGeneratesException.html"?>
                <title>How to avoid generating exception for &quot;keepAlive&quot;
                        component?</title>
                <para>To avoid exception, don&apos;t forget that the component stores beans in
                        serialized view, but your bean should implement java.io.Serializable.</para>
        </section>

        <section id="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest">
                <?dbhtml filename="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest.html"?>
                <title>Why form isn&apos;t submitted or setter isn&apos;t called after AJAX
                        request?</title>
                <para>This situation could happen because of conversion/validation errors on form
                        submission. In order to verify this, it&apos;s necessary to place this
                        updating via an Ajax error message inside a form:</para>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>
                <programlisting role="XML"><![CDATA[<a4j:outputPanel ajaxRendered="true">
   <h:messages/>
</a4j:outpurPanel>]]></programlisting>
        </section>

        <section id="DelayedRenderZone">
                <?dbhtml filename="DelayedRenderZone.html"?>
                <title>How to create &quot;a4j delayed render zone&quot;?</title>
                <para>The <emphasis role="bold">&lt;a4j:support&gt;</emphasis> component has
                        a &quot;requestDelay&quot; attribute where you can define the delay.</para>
                <para>More information about this problem could be found on the <ulink
                                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=104969"
                                >Ajax4Jsf Users Forum.</ulink>
                </para>
        </section>


        <section id="HowToStopPoll">
                <?dbhtml filename="HowToStopPoll.html"?>
                <title>How to stop &quot;a4j:poll&quot;?</title>
                <para>More information about this problem could be found on the <ulink
                                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=104951"
                                >Ajax4Jsf Users Forum. </ulink>
                </para>
        </section>

        <section id="IgnoreDupResponsesAndRequestDelay">
                <?dbhtml filename="IgnoreDupResponsesAndRequestDelay.html"?>

                <title>How to use IgnoreDupResponses and requestDelay?</title>
                <para>The <emphasis>
                                <property>&quot;IgnoreDupResponses&quot;</property>
                        </emphasis> attribute appeared from 1.0.4 RC1 version and is used on the
                        client for response ignoring after an Ajax request if a newer request has
                        been already sent. <para> The additional information could be found <ulink
                                        url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=105766"
                                        >here</ulink>. </para>
                        <emphasis>
                                <property>&quot;RequestDelay&quot;</property>
                        </emphasis> attribute also defines the client behavior. It sets the time
                        delay, after which another request could be sent, all other requests are
                        taken away from a queue except the last one. </para>
        </section>


        <section id="RefreshImage">
                <?dbhtml filename="RefreshImage.html"?>
                <title>How to refresh an image using &lt;a4j:support&gt; component?</title>
                <para>More information about this problem could be found on the <ulink
                                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=105995"
                                >Ajax4Jsf Users Forum. </ulink>
                </para>
        </section>

        <section id="EventQueueUsage">
                <?dbhtml filename="EventQueueUsage.html"?>
                <title>How to use &quot;EventQueue&quot; attribute?</title>
                <para>The <emphasis>
                                <property>&quot;EventQueue&quot;</property>
                        </emphasis> attribute defines the query name where the requests are saved
                        before their sending to the server. The queue is created for redundant
                        requests deleting during frequent events, which call several requests
                        forming one after another. The queue cuts redundant requests and send only
                        the last one. The queue is created in any case and named on default, the
                        attribute usage only re-defines this name. </para>
        </section>

        <section id="PageRequiredOrNot">
                <?dbhtml filename="PageRequiredOrNot.html"?>
                <title>Is &lt;a4j:page&gt; component required or not?</title>
                <para>
                        <emphasis role="bold">&lt;4j:page&gt;</emphasis> is a component used
                        for solving of incompatibility problems in early Ajax4jsf and MyFaces
                        versions. The component encodes the full html page structure. </para>
                <para>More information about this problem could be found on the <ulink
                                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=106849&amp;postdays=0&amp;postorder=asc&amp;start=0"
                                >Ajax4Jsf Users Forum. </ulink>
                </para>
        </section>

        <section id="SeveralStatusOnPage">
                <?dbhtml filename="SeveralStatusOnPage.html"?>
                <title>Can I have several &lt;a4j:status&gt; components on one page?</title>
                <para>Yes, you can. More information about this problem could be found on the <ulink
                                url="http://livedemo.exadel.com/richfaces-demo/richfaces/status.jsf?c=status"
                                >JBoss RichFaces Online Demos</ulink>. </para>
        </section>

        <section id="SomeProblemsWithRendering">
                <?dbhtml filename="SomeProblemsWithRendering.html"?>
                <title>Can I use &lt;a4j:region&gt; within &lt;a4j:repeat&gt;?</title>
                <para>
                        <emphasis role="bold">&lt;a4j:region&gt;</emphasis> can&apos;t
                        work inside iteration components like <emphasis role="bold"
                                >&lt;h:dataTable&gt;</emphasis> and <emphasis role="bold"
                                >&lt;a4j:repeat&gt;</emphasis>. </para>
                <para>The details could be found <ulink
                                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=109080"
                                >here. </ulink>
                </para>
        </section>

        <section id="CustomAjaxRequest">
                <?dbhtml filename="CustomAjaxRequest.html"?>
                <title>Why custom Ajax request does not work?</title>
                <para>More information about this problem could be found on the <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=114025"
                                >Ajax4Jsf Users Forum.</ulink>
                </para>
        </section>


        <section id="RerederingSingleDataTableColumn">
                <?dbhtml filename="RerederingSingleDataTableColumn.html"?>
                <title>How to reRender single dataTable column?</title>
                <para>More information about this problem could be found on the <ulink
                                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=105725"
                                >Ajax4Jsf Users Forum. </ulink>
                </para>
        </section>

        <section id="DisableSkins">
                <?dbhtml filename="DisableSkins.html"?>
                <title>How to disable skinnability?</title>
                <para>There is possibility to use special skin with name "plain". It doesn't have
                        any parameters. It&apos;s necessary for embedding RichFaces components into
                        existing projecst which have its own styles.</para>
                <para>For information you can see discussion about this problem on the <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4066340#4066340"
                                >Ajax4Jsf Users Forum. </ulink>
                </para>
        </section>

        <section id="reRenderingfailed">
                <?dbhtml filename="reRenderingfailed.html"?>
                <title>Why does reRendering fail? Hide/Show components using rendered.</title>
                <para> During &quot;show/hide&quot; functionality implementation the main
                        error happens because of the &quot;reRender&quot; attribute of some
                        Ajax core Action Component is set on a component that depends on rendered
                        properties, i.e. a component that is to be hidden/rendered is tried to be
                        updated. The problem is that if rendered=&quot;false&quot; in this
                        moment, the component isn&apos;t in the DOM tree and can&apos;t be
                        updated because of the general limitations described in the Ajax Processing
                        chapter. </para>
                <para>The correct variant of functionality implantation:</para>

                <orderedlist>
                        <listitem>
                                <para>With the rendered attribute wrap the component that is to be
                                        hidden or rendered on Ajax in a wrapper component (e.g.
                                        a4j:outputPanel)</para>
                        </listitem>

                        <listitem>
                                <para>Set reRender of an Ajax core Action component on this wrapper
                                        component instead of the component itself.</para>
                        </listitem>
                </orderedlist>

                <para>
                        <emphasis role="bold">Example:</emphasis>
                </para>

                <programlisting role="XML"><![CDATA[...
<a4j:outputPanel id="panel"> 
	<h:panelGroup rendered="#{bean.rendered}">
		<!--Some nested content to be hidden/shown depending on bean.rendered -->
	</h:panelGroup>
</a4j:outputPanel>
...
<a4j:commandButton action=".." value=".." reRender="panel"/>
...
]]></programlisting>

                <para>In this case the wrapper component always presents in the DOM tree and its
                        inner content could be updated dynamically on AJAX.</para>
        </section>

        <section id="PreventDupRerenderingPoll">
                <?dbhtml filename="PreventDupRerenderingPoll.html"?>
                <title>How to prevent duplicate reRendering when using &lt;a4j:poll&gt;?</title>
                <para>For information you can see discussion about this problem on the <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4059731#4059731"
                                >Ajax4Jsf Users Forum. </ulink>
                </para>
        </section>

        <section id="JSCallPropblemsInInclude">
                <?dbhtml filename="JSCallPropblemsInInclude.html"?>
                <title>Why does JavaScript call don&apos;t work in &lt;a4j:include&gt;?</title>
                
                <para>More information about this problem could be found on the <ulink
                                url="http://jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=104317"
                                >Ajax4Jsf Users Forum. </ulink>
                </para>
        </section>

        <section id="IncludeAndNavRules">
                <?dbhtml filename="IncludeAndNavRules.html"?>
                <title>How to use &lt;a4j:include&gt; and navigation rules?</title>
                <para>For information you can see discussion about this problem on the <ulink
                                url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;p=4062036#4062036"
                                >Ajax4Jsf Users Forum. </ulink>
                </para>
        </section>

        <section id="ResourceNotRegisteredException">
                <?dbhtml filename="ResourceNotRegisteredException.html"?>
                <title>What does ResourceNotRegistered Exception mean?</title>

                <para>RichFaces registers its resources (scripts, images) after an application is
                        accessed and then accesses it via a generated URL. During an application
                        development when a developer constantly updates it on the server, it could
                        happen that RichFaces re-registers its resources after every server restart
                        and a browser tries to access them via cashed URL.</para>

                <para>The problem is solved with browser cash update (e.g. CTRL+F5).</para>
        </section>
       
        <section id="RerenderingPartPage">
                <?dbhtml filename="RerenderingPartPage.html"?>
                <title>How to reRender only particular row(s) of table?</title>
                <para> If you use dataTable then you may use <emphasis>
                        <property>&quot;ajaxKeys&quot;</property>
                </emphasis> attribute to bind the rowKeys to be reRendered there.
                        After you need to point reRender on the specific rows. See also
                        <link linkend="IterationcomponentsAjaxattributes"
                                >&quot;Iteration components Ajax attributes
                                section&quot;</link>. </para>
        </section>
</chapter>
