You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Esteban Masoero <em...@getsense.com.ar> on 2010/02/15 20:30:06 UTC

Image that loads from a database, and use a default when no data exists

Hi there:

I know how to instanciate an image component that loads the image from a 
database, and I know how to make an image component that loads an image 
from a static resource.
Can I make a single image component that upon some condition, uses the 
database and upon another uses the static resource?

Thanks,

Esteban

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


Re: Image that loads from a database, and use a default when no data exists

Posted by Steve Swinsburg <st...@gmail.com>.
Hi Esteban,

Make a component  which takes a parameter and performs the appropriate action for its logic, then displays the image.
I do this is an app of mine, where the image comes from one of several sources.

cheers,
Steve


On 16/02/2010, at 6:30 AM, Esteban Masoero wrote:

> Hi there:
> 
> I know how to instanciate an image component that loads the image from a database, and I know how to make an image component that loads an image from a static resource.
> Can I make a single image component that upon some condition, uses the database and upon another uses the static resource?
> 
> Thanks,
> 
> Esteban
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>