You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Filippo Bonsignori <fi...@logobject.ch> on 2009/07/14 20:21:09 UTC
Dynamically generated background image
Hi all,
I would like to be able to set the background of a given <div> using a
BufferedDynamicImageResource: I tryed using the urlFor() method from
RequestCycle but without success (urlFor needs a ResourceReference and I
have just a Resource).
Thnx in advance for any help.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Dynamically generated background image
Posted by Mathias Nilsson <wi...@gmail.com>.
maybe something like this
String RESOURCE_NAME = MyClass.class.getName();
Application.get().getSharedResources().add(RESOURCE_NAME, new
MyImageResource());
ResourceReference ref = new ResourceReference(RESOURCE_NAME);
getPage().urlFor( ref );
--
View this message in context: http://www.nabble.com/Dynamically-generated-background-image-tp24485086p24494402.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Dynamically generated background image
Posted by fbonsignori <fi...@logobject.ch>.
What are you meaning with "use the name that you mount": actually my problem
is that I don't know how to create a ResourceReference to a
BufferedDynamicImageResource object that i have.
jthomerson wrote:
>
> You could mount the resource in your application init method and use
> the name that you mount it for the resource reference.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Dynamically-generated-background-image-tp24485086p24493344.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Dynamically generated background image
Posted by Jeremy Thomerson <je...@wickettraining.com>.
You could mount the resource in your application init method and use
the name that you mount it for the resource reference.
--
Jeremy Thomerson
http://www.wickettraining.com
On Tue, Jul 14, 2009 at 1:21 PM, Filippo
Bonsignori<fi...@logobject.ch> wrote:
> Hi all,
> I would like to be able to set the background of a given <div> using a
> BufferedDynamicImageResource: I tryed using the urlFor() method from
> RequestCycle but without success (urlFor needs a ResourceReference and I
> have just a Resource).
>
> Thnx in advance for any help.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org