• 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: WebObjects/WOnder CSS and Image path issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebObjects/WOnder CSS and Image path issues


  • Subject: Re: WebObjects/WOnder CSS and Image path issues
  • From: "Andrew R. Kinnie" <email@hidden>
  • Date: Mon, 1 Sep 2008 17:36:14 -0400

I also thought I was using Wonder.  The app was originally written for WO 5.1, then slowly upgraded to 5.2, 5.3, and now 5.4.  With 5.4 I brought it into Eclipse/WOLips and as of the past few days, tried to convert the old design to a more modern CSS based design, and using WOnder.

I followed the tutorial at http://wiki.objectstyle.org/confluence/display/WONDER/Integrate+Wonder+Into+an+Existing+Application

I have a webobject in my pagewrapper.wo which is in <head> and has the following in the wod:

css : ERXStyleSheet {
filename = "CSS/Main.css";
}

The Application, Session, and DirectAction.java files extend the proper wonder classes, and the EOs do as well.

I presume I'm missing something?  What else do I need to do to get this app to be using Wonder?  It obviously is to some extent or the ERXStylesheet presumably would not work at all.

Thanks for all your help

Andrew


.woa:
http://192.168.15.105:51313/cgi-bin/WebObjects/MyApp.woa
So yes, you are using DirectConnect (notice it's a port number here).

CSS
http://192.168.15.105:51313/cgi-bin/WebObjects/MyApp.woa/wr?wodata=file:/Users/MyUser/Documents/workspace/MyApp/build/MyApp.woa/Contents/WebServerResources/CSS/Main.css
This is the root of your problem.  I thought you were using Wonder?  How are you referencing this in your component?  When you're doing this properly with Wonder, you should end up with something like: http://vdoop.local:51991/_wr_/wodata=/Users/mschrag/Documents/workspace/Whatever/build/Whatever.woa/Contents/WebServerResources/CSS/common.css.  Notice the key difference being "/_wr_/" instead of "/wr?".  This little detail (which Wonder adds) makes relative paths work properly from inside of CSS.

Image:
http://192.168.15.105:51313/cgi-bin/WebObjects/MyApp.woa/Contents/WebServerResources/Image.gif
Once you get Wonder setup properly using the _wr_ static resource request handler, your original url(../Image.gif) will work fine.

ms



 _______________________________________________
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: WebObjects/WOnder CSS and Image path issues
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: WebObjects/WOnder CSS and Image path issues
  • Next by Date: Re: WebObjects/WOnder CSS and Image path issues
  • Previous by thread: Re: WebObjects/WOnder CSS and Image path issues
  • Next by thread: Re: WebObjects/WOnder CSS and Image path issues
  • Index(es):
    • Date
    • Thread