Re: WO Component Template....
Re: WO Component Template....
- Subject: Re: WO Component Template....
- From: Chuck Hill <email@hidden>
- Date: Thu, 5 Nov 2009 10:15:57 -0800
Hi Michael,
On Nov 5, 2009, at 9:07 AM, Michael Andronov wrote:
Hello,
A few newbie questions ( I've checked the list, but failed to find the
solution):
-- I am using Apache ( I hope so, at least application started as
http://localhost/cgi-bin/WebObjects/WOFirstRun.woa/-5678 );
Yes, that is through Apache.
-- The simple application, and WO appears within Safari, but *.css
files, images, etc, mentioned within the WO component .html file seems
not found or processed properly.
My questions are about WO Component template (.html file);
-- is there the preferred, de facto standard to create .html template
for the component?
-- is there any guideline(s) what to do /not to do?
( I've search the Wiki page, googled on topic, but failed to find info
on topic of presentation for WO component...).
Well formed HTML/XHTML is the only guideline that I can think of.
If I created the .html template, which contains the lines like:
"...
<link rel="stylesheet" type="text/css" media="screen,print"
href="Blank_files/Blank.css" />
...
"
then where the .css file should be located?
Unless you are using Wonder and the ERXResourceManager, it won't
work. The reason is that this is a relative path and it will be
relative to the path into the application.
There are several ways to do this.
The easiest way to make your example work is to add a leading slash so
that the path is not relative:
<link rel="stylesheet" type="text/css" media="screen,print" href="/
Blank_files/Blank.css" />
Following some threads within the list, I've tried the following:
a. create the link to Blank_files directory, containing the
Blank.css, within /Library/WebServer/Documents .
It should work with the change above. Do this:
cd /Library/WebServer/Documents
ln -s /path/to/your/project/WebServerResources/Blank_files Blank_files
Does not work.
b. place the Blank_files directory within project ( within WebServer
Resources, and all other possible ...Resources directories).
Does not work.
My other issue related question(s) are
-- Is there any technique to debug the issue like this? (Check some
log messages, etc...)?
You have to go to the browser to see what is happening with this. The
FireBug extension to FireFox works well.
-- Is there any documents ( Wiki, WOLips, etc. ) which contains some
information on the subject?
Have you been here? http://wiki.objectstyle.org/confluence/display/WO/Home
http://wiki.objectstyle.org/confluence/display/WO/Web+Applications-Development-CSS
http://www.codefab.com/2006/06/10/musings-on-managing-static-resources-in-webobjects/
Thank you very much for your kind attention to this matter.
You are most welcome.
Chuck
--
Chuck Hill Senior Consultant / VP Development
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