You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marios Skounakis <ms...@gmail.com> on 2013/03/14 09:47:50 UTC
Image.initModel() returns null and forbids attaching an image to a
form CompoundPropertyModel - why?
Hi all,
I have created a component that extends NonCachingImage which overrides
getImageResource(). The intent was to include this in a form, and retrieve
the image data from a property of the form object.
However this does not work because Image.initModel() returns null and as a
result my component does not get an AttachedPropertyModel.
If I override initModel in my component and replicate the code from
Component.initModel it work perfectly. But this is ugly (duplicate code,
etc).
So, any suggestions?
Thanks in advance,
Marios