My form bean contained something like:
public class MyBean extends ValidatorForm {
private MyEnum anEnum;
private String someField;
public MyEnum getAnEmum() {...}
public void setAnEnum(MyEnum val) {...}
public String getSomeField() {...}
public void setSomeField(String val) {...}
}
Not only did my class compile well, I also did not get any errors when running the code - except that anEnum was always populated with the first value listed in MyEnum.
After I changed anEnum to String (and the getter/setter too) and did the conversion to Enum in the backend code, all was fine.
And yes, after I found the solution, I remembered, that we did have such an issue in the past already :-/
No comments:
Post a Comment