Thursday 19 January 2012

JSF: <p:selectOneRadio> gives "Value is not valid"

Facelet:
<p:selectOneRadio
   value="#{fooBean.val}"
   converter="valConverter">
 <f:selectItems value="#{fooBean.refValues}" var="v" itemLabel="#{v.label}" itemValue="#{v}" />
</p:selectOneRadio>

Solution

Make sure that:
  • Make sure that val has properly implemented hashCode() and equals() (see StackOverflow)

No comments:

Post a Comment