Hi guys,

I'm desparate for your help: I just can't figure out how to suppress an
Image in case its IResource yields nothing.

Here's some context:

A customer may have a custom logo image (in fact, there's some logic
involved in determining which exact logo to use, but that's beside the
point) located in some database. Using Wicket's Image component, I
figured I would need to implement the logo resolution algorithm and
loading from the DB with either subclassing DynamicImageResource, or
subclassing AbstractResourceStream (which is more approriate?).

Works fine if a logo is there -- the image shows up. However, if there
_is_ no logo, the browser (firefox in my case) renders a question mark
instead of showing nothing. Both returning null or an empty byte array
doesn't matter.

I usually suppress a component with a behavior, or within the
#onConfigure()-Method, but in the Image's case, where I only have an
IResource or ResourceReference, I just don't have a hint on how to
determine if the image data is there or not (apart from asking the
database _again_ for the data or presence thereof).

Any ideas? What method/class have I missed? Where should I look?

Thanks for your help.
Cheers
    Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to