• 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: Newbie WOImageButton Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie WOImageButton Question


  • Subject: Re: Newbie WOImageButton Question
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 11 Oct 2006 21:01:15 -0700


On Oct 11, 2006, at 8:37 PM, Tarun Reddy wrote:

On Oct 11, 2006, at 3:26 PM, Paul Lynch wrote:


On 11 Oct 2006, at 21:03, Chip Myers wrote:

Hi, I'm having trouble accessing an image I'd like to display in a WOImageButton. Until now, I've only been able to generate a '?' mark image. According to the apple website, the filename attribute of WOImageButton is as follows:

filename - Path to the image relative to the WebServerResources directory.
I've performed a system search and unfortunately, have 14 different folders entitled "WebServerResources." All of these are within my main 'WebObjects' folder, however... some are contained within "JavaEOGeneration.framework" or "JavaWOExtensions.framework," etc...


Can anyone tell me where I need to place my image files to be called by a WOImageButton?

filename is the name of a file within your WebServerResources. Use the src binding if you want to give a path within your webserver docroot. To use filename, the image should be within your project, and in the Web Server target. This means it will be deployed into the /WebObjects folder in your docroot, in a subfolder with the name of your app (and further subfolders). The reason for this is that it is part of the localisation system used by WebObjects - and the documentation seems to me to be rather deceptive.



Along these lines, I would like to use static paths to images and CSS files that work both in development and in deployment. Is there some magic I can do for this?

No, not unless you consider soft links to be magic. :-P


It seems a bit of an over kill to use a WOImage for the images (and I believe there is a Project Wonder component for CSS) if they are static and have no access restrictions. Ideally, I would be able to put the entire hierarchy in my WOLips project directory and reference them from there.

You can pretty much put them where ever you want. I tend to keep them in a directory separate from the project (makes it easier to share among applications, easier to work with designers that don't know WO). But, really, the choice is up to you as to where to keep them. The one thing you need to do, and ought to do anyway, is to not use Direct Connect (launch with -WODirectConnectEnabled false) and run Apache to serve the images. Direct Connect is not your friend for this. Then (thanks to Art for this, I think), create a soft link from the doc root to the static resources for your project. Then for WOImage, you can make a binding like src="/MyApp/ images/button.gif";




Maybe on deployment, I could have Apache alias to that directory...

There are a lot of things to consider there, but unrelated to WO.

Chuck


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Newbie WOImageButton Question
      • From: Tarun Reddy <email@hidden>
References: 
 >Newbie WOImageButton Question (From: Chip Myers <email@hidden>)
 >Re: Newbie WOImageButton Question (From: Paul Lynch <email@hidden>)
 >Re: Newbie WOImageButton Question (From: Tarun Reddy <email@hidden>)

  • Prev by Date: Re: Newbie WOImageButton Question
  • Next by Date: Re: Newbie WOImageButton Question
  • Previous by thread: Re: Newbie WOImageButton Question
  • Next by thread: Re: Newbie WOImageButton Question
  • Index(es):
    • Date
    • Thread