See:

http://www.nabble.com/ERROR%3A-Value-is-not-a-valid-option-tf3270984.html#a9163090

and:
  http://issues.apache.org/jira/browse/MYFACES-1328


Andrew Robinson wrote:
I was having a problem with a bug in 1.1.3 of tomahawk/myfaces that
was fixed in 1.1.5 core, so I decided to upgrade to
1.1.5/1.1.5-Snapshot. After the upgrade, many of my select controls
(selectOneRadio, selectOneMenu, etc.) are now broken. The cause is
that in 1.1.3 non-converted values were allowed, but in 1.1.5 they are
not.

Example:

<t:selectOneRadio value="#{bean.value}">
 <f:selectItem itemValue="1" />
 <f:selectItem itemValue="2" />
</t:selectOneRadio>

public class MyBean {
 private int value;
 public int getValue() {return value;}
 public void setValue(int value) { this.value = value; }
}

In 1.1.3, this worked. In 1.1.5 this fails. The reason for the failure
is that in 1.1.5 it looks for a select item with value of Integer(1)
or Integer(2), but the select items contain "1" and "2". Since  the
following are false:

new Integer(1) == "1" && (new Integer(1)).equals("1")

The validation always fails. This was a nice feature in 1.1.3, that
the item value of a select item can be a string representation that
the converter would take care of. Was this part of the JSF spec. and
1.1.3 was not compliant, or was there another reason?

Reply via email to