views:

226

answers:

1

Hello,

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>
+1  A: 

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

Bozho
That code is only an example. in other cases I do not want the panel to be in the form. I have pages with many forms. and some button should be refreshing some other panel(s). not the one that you recommend should be within this form.
Marc
Thank you. It does work
Marc