I'm facing some problems with this widget:
<h:panelGroup>
<p:selectOneRadio required="true"
requiredMessage="Seleziona un elemento"
value="#{createCustomerView.customer.humanSex}">
<f:selectItems value="#{createCustomerView.values}"
var="humanSex" itemValue="humanSex"
itemLabel="#{humanSex.label}" />
</p:selectOneRadio>
</h:panelGroup>
The problem is that the value is not set into my instance of customer. Where am I wrong? This is the enum used in the selection for the user
public enum HumanSex {
MAN(1, "Maschio"), WOMAN(2, "Femmina");
public int id;
public String label;
private HumanSex(int id, String label) {
this.id = id;
this.label = label;
}
private HumanSex() {
}
//SET and GETTERS
}