How can I refresh an element outside the form through ajax render .
<ui:repeat var="o">
<h:form>
<h:panelGroup id="someid">
...
</h:panelGroup>
<div>
<h:commandButton action="#{o.doSomething}">
<f:ajax event="action" render="someid :rehreshthistoo" />
</h:commandButton>
</div>
<h:form>
</ui:repeat>
<h:panelGroup id="rehreshthistoo">
...
</h:panelGroup>
Your code looks fine. Although it would only work if the
<h:panelGroup id="rehreshthistoo">is not already by itself in anotherUINamingContainercomponent and also if you haven’t changed the default JSF naming container separator of:to something else such as_or-.The ultimate answer should be found in the JSF-generated HTML source. Open the page in the browser, rightclick and View Source, locate the generated
<span>element of<h:panelGroup id="rehreshthistoo">in there and then use exactly its ID in your<f:ajax render>with the naming container separator as prefix. If it contains an auto-generated ID of someUINamingContainerparent, then you should give that parent component a fixed ID as well.See also: