>>>>> On Fri, 19 Mar 2010 10:41:27 +0000 (UTC), "Jakob Korherr (JIRA)" >>>>> <dev@myfaces.apache.org> said:
JK> [ https://issues.apache.org/jira/browse/MYFACES-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] JK> Jakob Korherr resolved MYFACES-2614. JK> ------------------------------------ JK> Resolution: Fixed JK> Fix Version/s: 2.0.0-beta-3 JK> 1.2.9-SNAPSHOT >> EnumConverter uses toString() instead of name() >> ----------------------------------------------- >> >> Key: MYFACES-2614 >> URL: https://issues.apache.org/jira/browse/MYFACES-2614 >> Project: MyFaces Core >> Issue Type: Bug >> Affects Versions: 1.2.8, 2.0.0-beta-3 >> Reporter: gui >> Assignee: Jakob Korherr >> Fix For: 1.2.9-SNAPSHOT, 2.0.0-beta-3 >> >> >> Hi, >> I have an enum that has overridden the toString method. >> It seems the EnumConverter uses toString to convert an enum to a string (and >> Enum.valueOf(..) to find it back). However, since my toString is overriden, >> the value it returns is not valid input for the Enum.valueOf(..) function >> and the converter raises an exception. >> A better approach is to use .name() as string representation of an Enum. This issue seems to be identical to <https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=470>, so I have copied it there. Ed -- | edward.bu...@oracle.com | office: 408 884 9519 OR x31640 | homepage: | http://ridingthecrest.com/