Hi!
In your first code example you are binding the property model to your
config map, using a string key for lookup (“VALUE1”).
Since generics in java is mostly syntactic sugar, I think the PropertyModel
reads & writes from your config map using a String key.
This is why hibernate complains: the
you are saving the value and not the key, which is why hibernate complains.
WHy not choose a DropDownBox ?
François
> Le 4 févr. 2019 à 14:03, Zbynek Vavros a écrit :
>
> Do you mean to manually iterate through the map and converting the string
> keys
> Wicket binds to enum keys? Even if I
Do you mean to manually iterate through the map and converting the string
keys
Wicket binds to enum keys? Even if I try to iterate through the map I get
the same ClassCastException.
Somehow Wicket managed to insert String as a key instead of enum.
Zbynek
On Mon, Feb 4, 2019 at 1:55 PM Francois
use MyEnum.valueOf("your string ») before saving the data
François
> Le 4 févr. 2019 à 13:51, Zbynek Vavros a écrit :
>
> I got this class that has map with enums as keys:
>
> public class MasterClass {
>
>private Map config = Maps.newHashMap();
> }
>
> enum is classic:
>
> public
I got this class that has map with enums as keys:
public class MasterClass {
private Map config = Maps.newHashMap();
}
enum is classic:
public enum MyEnum {
VALUE1,
VALUE2
}
now I would like to use one entry of this map as a model for TextField:
new