Hi,
I want to use a Map<MyEnum,Boolean> within a CompoundPropertyModel but
it seems that String keys are supported only
since MapGetSet.setValue() ignores the given
PropertyResolverConverter. So my SimpleEnumConverter is not used
an I end up with:
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Enum
at java.util.EnumMap.put(EnumMap.java:62)
at org.apache.wicket.util.lang.PropertyResolver
$MapGetSet.setValue(PropertyResolver.java:743)
at org.apache.wicket.util.lang.PropertyResolver
$ObjectAndGetSetter.setValue(PropertyResolver.java:588)
at org.apache.wicket.util.lang.PropertyResolver.setValue
(PropertyResolver.java:136)
at org.apache.wicket.model.AbstractPropertyModel.setObject
(AbstractPropertyModel.java:169)
at org.apache.wicket.Component.setDefaultModelObject
(Component.java:3052)
at org.apache.wicket.markup.html.form.FormComponent.updateModel
(FormComponent.java:1168)
Now ListGetSet also ignores PropertyResolverConverter but ArrayGetSet
and MethodGetAndSet do not, so
is this by Intention or a possible bug?
I know the workaround is easy but I would like to use such a map for a
group of checkboxes.
Thanks in advance,
Robin.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]