I've got a checkbox with an ajax event, upon changing the value, the checkbox will change a boolean in my bean. This ajax event should also render a panelGrid with attribute rendered="#{!*the bean's boolean*}"
. This means that the panelGrid should be visible when unchecked, and visible when checked. The boolean will be set to false by default (by @PostConstruct).
This is the corresponding code snippet:
<h:selectBooleanCheckbox id="useAddress" value="#{handleOrder.useAddress}">
<f:ajax event="change" execute="useAddress" render="outputAddress" />
</h:selectBooleanCheckbox>
<h:panelGrid id="outputAddress" rendered="#{!handleOrder.useAddress}" columns="2" width="468px">
(...)
This snippet is surrounded by a <h:form />
tag.
My getUseAddress()
and setUseAddress()
will be executed upon valuechange.
My question is, why is my panelGrid always visible?