To use the Enum class in the PropertyModel, you can write:
new PropertyModel(MyObject, "MyEnumClass");
Now this only works if MyEnumClass defined in the MyObject class.
How can I use the standalone Enum class in the model?
Edit: Specify:
RadioGroup<MyEnum> rg = new RadioGroup<MyEnum>("radioGroupID", new Model<MyEnum>(MyEnum.NORMAL)); rg.add(new Radio<MyEnum>("radioNormal", new Model<MyEnum>(MyEnum.NORMAL))); rg.add(new Radio<MyEnum>("radioSpecial", new Model<MyEnum>(MyEnum.SPECIAL)));
The problem is that changing the switch does not change the model on RadioGroup .
source share