ReRender Following Checking Checkbox
djeverson Dec 28, 2008 5:33 PMHello,
I have a checkbox on a form that if checked I want additional fields to appear. These additional fields are only applicable if the checkbox is checked.
I can not get these fields to display when the checkbox is checked.
Environment: JBoss 4.2.1GA, Seam 2.1.1GA, Richfaces 3.2.2
I have attached snippets of the code below. Could someone take a quick look and let me know if they see anything that is wrong.
Thanks!
<a4j:form id="frm">
<rich:simpleTogglePanel switchType="client" label="Basic Information">
[...additional fields removed...]
<a4j:region renderRegionOnly="true">
<s:decorate id="enableLateFeeDecorate" template="../common/edit.xhtml">
<ui:define name="label">Enable Late Fees:</ui:define>
<h:selectBooleanCheckbox id="enableLateFee" value="#{editRegistrationPeriod.detail.enableLateFee}">
<f:attribute name="messageLabel" value="Enable Late Fees"/>
<a4j:support event="onclick" reRender="lateFeeEntryContainer"/>
</h:selectBooleanCheckbox>
</s:decorate>
<a4j:outputPanel id="lateFeeEntryContainer">
<s:div id="lateFeeEntry" rendered="#{editRegistrationPeriod.detail.enableLateFee}">
<s:decorate id="lateFeeDecorate" template="../common/edit.xhtml">
<ui:define name="label">Registration Late Fee:</ui:define>
<h:inputText id="lateFee" size="50" maxlength="48" required="false" value="#{editRegistrationPeriod.detail.lateFeeAmount}">
<f:attribute name="messageLabel" value="Registration Late Fee Amount"/>
</h:inputText>
</s:decorate>
<s:decorate id="lateFeeEffectiveDateDecorate" template="../common/edit.xhtml">
<ui:define name="label">Late Fee Effective Date:</ui:define>
<rich:calendar value="#{editRegistrationPeriod.detail.lateFeeEffectiveDate}" datePattern="MMM d,yyyy" cellWidth="24px" cellHeight="22px" style="width:200px">
<f:attribute name="messageLabel" value="Registration Late Fee Effective Date"/>
</rich:calendar>
</s:decorate>
</s:div>
</a4j:outputPanel>
</a4j:region>
</rich:simpleTogglePanel>
[...additional toggle panels and content removed...]
</a4j:form>