Re: Enum with RadioChoice leads to NumberFormatException

2009-08-15 Thread Mischa Dasberg
Hi Reinout, I guess your Person object has a private int sex; instead of private SexType sex; So what happens is that you are trying to convert a SexType to an Integer which obviously returns an illegalArgumentException. Put it like this and it should work. public class Person {

Enum with RadioChoice leads to NumberFormatException

2009-08-14 Thread Reinout van Schouwen
Hi all, If I have an enum 'SexTypes' in the class Person like this: public static enum SexTypes { SEX_UNKNOWN(0), SEX_MALE(1), SEX_FEMALE(2), SEX_NOT_APPLICABLE(9); /* Values for sex are taken from ISO 5218:1977 Representation of Human Sexes */ private final int