I have a JSF page where I want to set a checkbox which, when clicked, will add / remove some other form fields from the page. Here is the code (simplified) that I have for this checkbox:
<h:selectBooleanCheckbox title="showComponentToReRender" value="#{backingBean.showComponentToReRender}">
<a4j:support event="onsubmit" reRender="componentToReRender" />
</h:selectBooleanCheckbox>
Here is the code for the component I want to hide:
<h:selectOneMenu id="componentToReRender" value="#{backingBean.value}" rendered="#{valuesList.rowCount>1 && backingBean.showComponentToReRender}">
<s:selectItems value="#{valuesList}" var="value"/>
</h:selectOneMenu>
Clicking the checkbox currently does nothing; that "selectOneMenu" will not disappear. What am I doing wrong?
source
share