Re: <td background=resource-reference ...>
Re: <td background=resource-reference ...>
- Subject: Re: <td background=resource-reference ...>
- From: email@hidden
- Date: Wed, 22 Oct 2003 12:32:57 CDT
- Priority: 3 (Normal)
[demime could not interpret encoding binary - treating as plain text]
You want to make the TD dynamic, yes. You want to add a binding for
BACKGROUND, and bind it to a method. Say, "tdBackgroundURL".
public String tdBackgroundURL() {
WOResourceManager rm = application().resourceManager();
return rm.urlForResourceNamed("xxx.png", null, null, context().request());
//Second arg is framework name; null for the equivelent of "app".
//Third arg is a 'language list'. I don't know exactly how this is used,
if at all,
//if you are using WO's built in localization features. I don't use them, have
//always left it null, doesn't cause a problem.
}
That's the cleanest way I know to do it.
On Tue, 21 Oct 2003 20:23:47 -0400 Gavin Eadie wrote:
> I can never be sure I'm not overlooking something really simple but
> I'm trying to add a background image to a table cell:
>
> <TD BACKGROUND=... >
>
> where the background image is a resource. I make the <TD
> dynamic, of course, and can use the "otherTag" binding to emit an
> absolute reference to the image, but that's not the WO way!
>
> If it were to be just a plain image reference (WOImage), or I wanted
> the images' URL (WOResourceURL), the .wod would contain:
>
> file = "xxx.png";
> framework = "app";
>
> but that file/framework combo isn't an option with
> genericContainer's bindings.
>
> Any ideas, my friends? ... Gav
>
> ________________
> Gavin Eadie
> WebApp Thinker
> U of Michigan
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.