It uses WOContext _urlForResourceNamed which calls WOResourceManager 
urlForResourceNamed().  If you are using Wonder, ERXResourceManager is used 
which provides a fix for using paths relative to your resource.  (Wonder makes 
a '?' into a '/' I believe).  

So if the script and the image are in the same framework, it should be doable. 
It might help if you dig around in Wonder's ajax framework to see how they do 
it there.  Judging by the directories, it looks like the ibox.js is loading 
images relative to the script.

Also, the WOFrameworksBaseURL property will allow you to set a custom framework 
path for the WSR.

http://developer.apple.com/legacy/mac/library/documentation/WebObjects/WOAppProperties/WOAppProperties.pdf

[OT] cicada.com... WebObjects... in Raleigh, NC?  I didn't know anyone was 
doing WO in Raleigh. (^_^)

Ramsey


On Jun 18, 2011, at 12:37 PM, Catherine Seppanen wrote:

> Executive summary:
> 
> How does a WOImage element like this:
> 
> <wo:img framework="SharedFramework" filename="template/logo.png" />
> 
> get translated to this HTML:
> 
> <img 
> src="/WebObjects/MyApp1.woa/Frameworks/SharedFramework.framework/WebServerResources/template/logo.png">
> 
> Specifically, I need to know how the directory structure of the WebObjects 
> directory is specified/determined.
> 
> 
> Long explanation:
> 
> My web server documents directory currently has the following structure:
> 
> /WebObjects
>  /MyApp1.woa
>    /Contents
>    /Frameworks
>      /SharedFramework.framework
>        /WebServerResources
>  /MyApp2.woa
>    /Contents
>    /Frameworks
>      /SharedFramework.framework
>        /WebServerResources
> 
> One of the JavaScript libraries in SharedFramework needs some absolute paths 
> (it's Fancybox's IE6 hacks using AlphaImageLoader in case anyone is using 
> that). Since I use the JavaScript library in multiple apps, I can't specify 
> the paths since they change by app:
> 
> /WebObjects/MyApp1.woa/Frameworks/SharedFramework.framework/WebServerResources/path-to-image
> /WebObjects/MyApp2.woa/Frameworks/SharedFramework.framework/WebServerResources/path-to-image
> 
> My first thought was to go back to the old document structure like so:
> 
> /WebObjects
>  /MyApp1.woa
>  /MyApp2.woa
>  /Frameworks
>    /SharedFramework.framework
> 
> Then my absolute path won't be a problem:
> 
> /WebObjects/Frameworks/SharedFramework.framework/WebServerResources/path-to-image
> 
> I see how to accomplish this during the installation step (build.xml changes) 
> but I want to make sure I'm not in for trouble with WOImage tags like above.
> 
> My apps are WebObjects 5.3.3 using Project Wonder.
> 
> Thanks,
> Catherine
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
> 
> This email sent to [email protected]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to