hi,
i'd say either:
myTd.add(new AttributeModifier("style", true, "background-image:url(" +
RequestCycle.urlFor(myImage) + ");"));
// use an AttributeAppender if you want to preserve an existing style
attribute
or override onComponentTag of myTd and put it in the tag like:
tag.put("style", "background-image:url(" + RequestCycle.urlFor(myImage) +
");");
there maybe even other ways though (like interpolating a css file with the
url and rendering it in the head)
hth,
gerolf
On 9/25/07, wfaler <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
> I want to use a ResourceReference (or something comparable) to set the
> background-attribute of a td-cell with an image on my classpath.
> How do I achieve this?
> It is quite straightforward for images, but it gets trickier with
> background-images to other html elements..
>
> / Wille
> --
> View this message in context:
> http://www.nabble.com/Using-Resource-to-provide-background-attribute-to-td-tag--tf4515517.html#a12879415
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>