• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: <td background=resource-reference ...>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <td background=resource-reference ...>


  • Subject: Re: <td background=resource-reference ...>
  • From: Gavin Eadie <email@hidden>
  • Date: Tue, 21 Oct 2003 23:28:28 -0400

At 7:22 PM -0700 10/21/03, Sam Barnum wrote:
You'll want to add the image file to your project under the WebServer target, then use WOResourceManager to get the URL of the image file, and bind that to the background binding of your dynamic <td> cell.

Thanks, Sam ... I gave that some thought before I posted my question, and it IS the best way I can think of so far. The downside is that it's not too easy to do this in a general kind of way. As you suggest, assuming a .wod containing something like:


      TD: WOGenericContainer { elementName = "TD"; background = bgImageA; }

the component containing this can use the getBgImageA() method to generate the required URL path from the resource map.


The downside is that, there needs to be as many getters (getBgImage[A|B|C|D|E|F|...]) as there are usages of a dynamic <TD>. If I change the above to be


TD: WOGenericContainer { elementName = "TD"; file = "A.gif"; framework="app"; }

it gets more general but I lose the niceness of the file and framework bindings 'knowing' they refer to resource and framework respectively, and can't up popups when choosing values in WOBuilder


All in all, this is really a question of style -- I can do what i need to, but it feels ugly.



This is, alas, when I really want a binding that looks like:

TD: WOGenericContainer { elementName = "TD"; background = image("A.gif"); }

so the getImage method would be given the String and I could delay binding on the image name.
_______________________________________________
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.

  • Follow-Ups:
    • Re: <td background=resource-reference ...>
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: <td background=resource-reference ...>
  • Next by Date: Re: <td background=resource-reference ...>
  • Previous by thread: Re: <td background=resource-reference ...>
  • Next by thread: Re: <td background=resource-reference ...>
  • Index(es):
    • Date
    • Thread