我正在使用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>发布于 2010-05-22 00:47:32
为了跨命名容器进行reRender,您需要类似于reRender=":myComponent"的内容--开头的冒号表示组件在组件树中的绝对位置。否则,所有in都是相对于当前命名容器实现的,在本例中,命名容器将是一种形式。
请参阅UIComponent.findComponent(..)
https://stackoverflow.com/questions/2882658
复制相似问题