Marc
Marc

Reputation: 351

Seam reRender component in partial; reRender across naming containers

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

Upvotes: 0

Views: 1244

Answers (1)

Bozho
Bozho

Reputation: 597124

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(..)

Upvotes: 1

Related Questions