使用RichFaces进行绝对重新渲染 [英] Absolute reRendering using RichFaces

查看:114
本文介绍了使用RichFaces进行绝对重新渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是RichFaces reRender无法在元素树中的当前元素下"工作;只有上层元素会被重新渲染.

My problem is that RichFaces reRender does not work 'under' the current element in the element tree; only upper elements get rerendered.

是否可以通过AJAX访问较低的元素?

Is there any way to access lower elements with AJAX?

任何帮助将不胜感激! 丹尼尔

Any help would be appreciated! Daniel

EDIT (我编辑),我将此问题编辑为更通用的问题.如果对原始问题感兴趣,请参阅修订.

EDIT I edited this question to a more general one. See revisions if interested in the original question.

推荐答案

下面是一个示例,其中changePanel111()更改了下部元素的内容:

Here is an example where changePanel111() changes the content of a lower element:

<h:form id="form" prependId="true">
    <rich:panel id="PANEL1">
        <h:outputText id="PANEL1TEXT" value="#{ajaxTestBean.panel1}"/>
        <rich:panel id="PANEL11">
            <h:outputText id="PANEL11TEXT" value="#{ajaxTestBean.panel11}"/>
            <rich:panel id="PANEL111">
                <h:outputText id="PANEL111TEXT" value="#{ajaxTestBean.panel111}"/>
            </rich:panel>
        </rich:panel>
        <rich:panel id="PANEL12">
            <h:outputText id="PANEL12TEXT" value="#{ajaxTestBean.panel12}"/>
            <br/>
            <a4j:commandLink value="CHANGE PANEL12" action="#{ajaxTestBean.changePanel12}">
                <a4j:support reRender="PANEL12" event="onclick"/>
            </a4j:commandLink>
            <br/>
            <a4j:commandLink value="CHANGE PANEL111" action="#{ajaxTestBean.changePanel111}">
                <a4j:support reRender="form:PANEL111" event="onclick"/>
            </a4j:commandLink>
        </rich:panel>
    </rich:panel>
</h:form>

请注意如何将下部元素标识为form:PANEL111.

Notice how the lower element needs to be identified as form:PANEL111.

希望这会有所帮助!

这篇关于使用RichFaces进行绝对重新渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆