Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save oliviermarin/4eb5222b1082fde177d63c75004672ad to your computer and use it in GitHub Desktop.
Save oliviermarin/4eb5222b1082fde177d63c75004672ad to your computer and use it in GitHub Desktop.
xhtml | Face :
<p:row>
<p:column>
<p:outputLabel for="zone-geographique"
value="#{messages['operationimmobiliere.zone.geographique']} : " />
</p:column>
<p:column>
<p:selectOneRadio id="zone-geographique"
value="#{operationImmobiliereFace.codeZoneGeographique}">
<p:ajax listener="#{operationImmobiliereFace.onChangeZoneGeographique}" />
<f:selectItems value="#{operationImmobiliereFace.allZonesGeographiques}"
var="zoneGeographique"
itemLabel="#{zoneGeographique.libelle}"
itemValue="#{zoneGeographique.code}"/>
</p:selectOneRadio>
</p:column>
</p:row>
Java | View :
// attribut
private String codeZoneGeographique;
// listener
public void onChangeZoneGeographique() {
LOGGER.info(String.format("code de la zone geographique : %s", this.codeZoneGeographique));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment