Seam reRender组件部分; reRender跨命名容器

时间:2010-05-21 13:56:29

标签: jsf seam richfaces

我正在使用seam来开发一个简单的Web应用程序。 在许多地方使用a4j commandButton,属性为reRender =“componentName”

componentName在大多数地方都是a4j outputPanel

在我使用模板之前,它始终有效。包含两个不同的视图。 reRender应用于整个视图确实有效,但reRender应用于内部组件却没有。

与页面规则相同的问题,我定义的所有操作都不再起作用。

这是Seam的问题吗,有人遇到过这种情况吗?

<a4j:outputPanel id="panel1">
             <h:form>
                    <div class="section">
                                      // whatever code
                                </div>

 <a4j:commandButton id="button1" value="Add" action="#{bean1.action()}" reRender="panel1"/>
 <h:commandButton id="reset" value="Reset" action="#{bean1.reset}"/>
 </h:form>

</a4j:outputPanel>

1 个答案:

答案 0 :(得分:1)

为了reRender跨命名容器,你需要像reRender=":myComponent"这样的东西 - 开头的冒号表示组件树中组件的绝对位置。否则,所有ID都是相对于当前命名容器实现的,在这种情况下,这将是一种形式。

请参阅UIComponent.findComponent(..)

相关问题