Hi,

I have a DynamicImageResource subclass that I add to an Image
using the Image(String id, Resource imageResource) constructor.
This works fine as long as the Locale of my Image doesn't change
or isn't 'lost' because of serialization (it's for reasons I don't
understand
a transient field, see https://issues.apache.org/jira/browse/WICKET-1062 ).
In that case, LocalizedImageResource.setSrcAttribute(...) sets
the resource to null, so my precious resource is lost and the
result is lots of broken images.
I think LocalizedImageResource.setSrcAttribute(...) shouldn't
reset the resource field if locales (and styles) don't match, since
Resource doesn't seem to be locale/style specific (unlike
ResourceReference) and cannot be reloaded/recomputed
as the commentary suggests if the
Image(String id, Resource imageResource) constructor was
used.
Any ideas how to work around that problem?
Can anyone confirm that this is a bug? In that case, I'll
create an issue on JIRA.

cheers,
Jonas

Reply via email to