Closed bluecosmo closed 9 years ago
Thanks for the kind words.
ModelFactory is a tool to get Type-Safety into PropertyModel in the first place, so using it for type "Properties" does not bring any advantage, as it looses the type-info already.
Two things strike me on your code snippet above:
normally, you'd want to be able to resolve that at request processing time, like
pm = new PropertyModel
Better use a proper Bean like: class CaptchaInput{ String userProvidedCaptcha; // getters/setters }
then you could use ModelFactory like
PropertyModel
If you cannot do that, because a thrid party Component gives you nothing but a Map, as mentioned above, i suggest you implement an AbstractReadonlyModel.
Take this with a grain of salt as it is pulled from the little code you posted without knowing enough about your Context. Still, i guess the Wicket-User mailinglist is your friend when it comes to proper usage of PropertyModels.
Have fun with Wicket.
Hello,
first of all, great library. My question is how can i connect a ValueMap with wicketeer?
In normal wicket it is:
where 'captchaModel.getObject().getProperties()' is a ValueMap.
Cheers