Affichage conditionné par la valeur d'un checkbox
Hello les gens,
Je souhaiterais afficher/cacher des données en fonction de la valeur d'une case à cocher sans submiter mon form.
Je m'y prend comme suit mais sans grand succès:
Code:
1 2 3 4 5 6 7 8 9 10 11
|
<h:form>
<h:selectBooleanCheckbox id="checkboxId" value="#{login.register}" >
<p:ajax event="change" update="panelId" />
</h:selectBooleanCheckbox>
<h:panelGrid id="panelId">
<h:outputLabel rendered="#{login.register}" >quelque chose</h:outputLabel>
<h:outputText rendered="#{login.register}" value="quelque chose" />
</h:panelGrid>
</h:form> |
Or je ne perçois aucun changement lorsque je clique sur mon checkbox. Qu'est ce qui clôche avec mon code ?
Merci pour toutes vos contributions.