I have a problem with selectBooleanCheckbox and inputMasked. When I check this, I need to enable one inputMask. And when I uncheck this, I need to disable one inputMask. It is working when I put a4j:support inside selectBooleanCheckbox, but the field loses the mask. Why is it happen?
And when I click in p:commandButton type reset, the selectBooleanCheckbox is not unchecked. Other fields are cleaned. If I use h:commandButton, is unchecked.
my components
Code: Select all
<h:selectBooleanCheckbox id="chalsms" value="#{usuariosBean.habilitaAlarmeSms}" valueChangeListener="#{usuariosBean.changeAlarmeSms}" style="font-family:Calibri;padding: 3px;">
<a4j:support event="onchange" reRender="celAlarme" />
</h:selectBooleanCheckbox>
<p:inputMask id="celAlarme" disabled="#{!usuariosBean.habilitaAlarmeSms}" mask="(99)9999-9999" value="#{usuariosBean.usuarios.contato}" style="font-family:Calibri;width : 90px;padding:3px;" maxlength="100"/>
Thanks
<p:commandButton update="form1" type="reset" action="#{usuariosBean.cleanFields}" value="Clean Fields"/>