开发者

Seam reRender component in partial; reRender across naming containers

开发者 https://www.devze.com 2022-12-30 23:12 出处:网络
I\'m using seam to develop a simple web app. Using a4j commandButtonin many places, with the property reRender=\"componentName\"

I'm using seam to develop a simple web app. Using a4j commandButton in many places, with the property reRender="componentName"

componentName is in most places a a4j outputPanel

Which always worked, until I used a template. with include of two different views. reRender applied to the whole view does work, but reRender applied to an inner component does not.

Same issue with page rules, all action I had defined are not functioning any more.

Is this a problem with Seam, did s开发者_如何学Goomeone experience this?

<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>


In order to reRender across naming containers you need something like reRender=":myComponent" - the colon in the beginning denotes absolute location of the component in the component tree. Otherwise all IDs are realized relative to the current naming container, which would be a form in this case.

See UIComponent.findComponent(..)

0

精彩评论

暂无评论...
验证码 换一张
取 消