a4j:ajax won't render h:panelgrid

喜欢而已 提交于 2019-12-06 08:51:08

The ajax magic is executed by JavaScript code which runs in the client side and works on the HTML DOM tree. With specifying render="someId", you're basically telling JavaScript to replace the HTML representation of the JSF component with the given ID with the new HTML representation in the retrieved ajax response.

However, if the HTML representation of the JSF component with the given ID is not rendered by JSF in first place, then JavaScript can't find anything in the HTML DOM tree to replace.

This is what is happening in your case. You should instead specify the ID of a JSF component which is always rendered, so that JavaScript can find it and update it in the HTML DOM tree whenever necessary. You could use a <h:panelGroup> for this.

<a4j:ajax ... render="formPadre" />
...
<h:panelGroup id="formPadre">
    <h:panelGrid ... rendered="#{IngresoAlumno.padre.per_Rut gt 0}">
        ...

See also:

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!