views:

485

answers:

1

In my JSF + Richfaces application I observed that rich:datascroller gets executed when I fire ajax request from different a4j:region. This is my code:

<jsfc:view>

    <a4j:region renderRegionOnly="true">
        <a4j:form>

            <a4j:region renderRegionOnly="true">

                <jsfh:selectOneMenu id="selectOneMerchant" value="#{smsTrafficBean.page}">

                    <a4j:support event="onchange" ajaxSingle="true"/>
                    <jsfc:selectItem itemValue="a" itemLabel="a"/>
                    <jsfc:selectItem itemValue="b" itemLabel="b"/>

                </jsfh:selectOneMenu>

            </a4j:region>


        </a4j:form>
    </a4j:region>


    <a4j:region renderRegionOnly="true">
        <jsfh:form>
            <a4j:region renderRegionOnly="true">

                <rich:datascroller id="scroll_1" for="sms" page="#{smsTrafficBean.page}"/>

                <rich:dataTable id="sms" var="s" value="#{smsTrafficBean.smsByFilter}">

                </rich:dataTable>
            </a4j:region>
        </jsfh:form>
    </a4j:region>

</jsfc:view>

When user selects item from selectOneMenu ajax request is fired to the server. During generating response to that request smsTrafficBean.smsByFilter method is executed which is not what i expect. When i remove rich:datascroller everything works fine.

Does any body have any idea why adding rich:datascroller component effects in calling smsTrafficBean.smsByFilter when the ajax request is fired from different aj4:region?

A: 

because you're changing the value of smsTrafficBean.page in the selectmenu which is then read by the scroller?