简体   繁体   English

Richfaces DataScroller在不需要时执行

[英]Richfaces DataScroller executed when not needed

In my JSF + Richfaces application I observed that rich:datascroller gets executed when I fire ajax request from different a4j:region. 在我的JSF + Richfaces应用程序中,我观察到当我触发来自不同a4j:region的ajax请求时,rich:datascroller被执行。 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. 当用户从selectOneMenu中选择项目时,会向服务器触发ajax请求。 During generating response to that request smsTrafficBean.smsByFilter method is executed which is not what i expect. 在生成对该请求的响应期间,执行了smsTrafficBean.smsByFilter方法,这不是我期望的。 When i remove rich:datascroller everything works fine. 当我删除rich:datascroller时,一切正常。

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? 有谁知道为什么当从不同的aj4:region触发ajax请求时,在调用smsTrafficBean.smsByFilter时增加rich:datascroller组件效果吗?

因为您正在更改selectmenu中的smsTrafficBean.page的值,然后滚动条会读取它?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM