Still Unable to Display an Image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Still Unable to Display an Image

dirk newbold
Hi All,

I posted the question below last week and although I had may tips (a lot went over my head) I am still unable to display an image in a webpage generated by Seaside. 

I have tried all sorts of variations on the 'image' method but still can't get the method to find the image "Which dir do I place the Image?" - I have been able, through the 'style sheets' to get the height, width and a border around where the image should be but I am just left with the old 'red cross' icon. 

I am using Cincom Visual Works 7.4.1nc with the 'SeasideForWebToolKit', 'VisualWave' and 'WebToolkits' parcels loaded. 

When I investigated the server created by VW: http://localhost:8008 and went to the configuration page for 'seaside' the Home Directory :$(VISUALWORKS)/web/examples, was displayed which through me off track for a while as Seaside must really be overriding this path as when, just by coincidence I pressed the submit button the $(VISUALWORKS)/web/examples actually became the Home Directory (and was actually able to pick files up from there) but then none of the Seaside webpages would load and I had to reinstall a previous VW Image.

Could someone please set me straight as I am so frustrated?

Original Post:

I am just trying to display an image in a webpage. Originally it was generated by a html file but now in Seaside (renderContentOn: html).

e.g. the image is located at:
c:\Program Files\Cincom\vw7.4.1nc\web
\examples

With html and having the image located in the same dir as the html file I used:
<img src="memberMail.gif" alt="Email Member"/>
Which displayed the image in web page generated by that html file.

I just can't figure out how to do it in Seaside.  I have been fine with all the other facets of converting my html files into Seaside but for some reason I can't figure this out - I'm afraid I'm just a beginner in Smalltalk/Seaside.

Cheers,

Dirk

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Still Unable to Display an Image

Michel Bany
Hi Dirk,

Assuming that
(1) you have a standard Seaside install, as you said,
(2) you have a file named 'memberMail.gif' in folder c:\Program Files\Cincom\vw7.4.1nc\web\examples\

Then
(a) you should be able to see you picture when pointing your browser to
(b) you should also see it at
(c) you should also see it as part of a Seaside component if the rendering code contains
html image: '../memberMail.gif'

Regarding the configuration of the sites, you would need to read the WebToolkit documentation.
This is a pdf document named 'WebAppDevGuide.pdf' and located in the doc folder.
The document explains how to sites are defined using *.ini files in the web folder.

You will then notice that the 'seaside' site is not defined using an *.ini file.
Instead it is created programmatically during the installation of Seaside to minimize the amount of setup for beginners.
It is also recreated each time you bring up your VW image.
The code that creates the 'seaside' site can be found in method AAADocumentation>>createWebSite.
In this method you will notice this statement
configParameters at: 'directory' put: default directoryName.
which means the the home directory of the 'seaside' site is the same as the home directory of the 'default' site.
See in 'default-site.ini' directory = $(VISUALWORKS)/web/examples
This remark should explain (b) above.

An advanced Seaside user will probably setup Seaside sites using the *.ini files.

To define a Seaside site using an *.ini file, you will need to create a new file, say 'mySite.ini'
with some contents like this
[configuration]
directory = D:/mySite
environment = MyNameSpace
description = My Seaside site
home = startpage.html
[logical-names]
app = servlet/SeasideServlet
Next you will need to update the 'webtools.ini' file to include that line
mySite = mySite.ini
Finally, you will need to force WebToolkit to reread its config files by going to
and follow the instructions, or go directly to

Place your static files in the folder defined in the mySite.ini file (directory =)

Once this is done you can go to you site using
or

Let me know if this helps,
Michel.

I posted the question below last week and although I had may tips (a lot went over my head) I am still unable to display an image in a webpage generated by Seaside. 

I have tried all sorts of variations on the 'image' method but still can't get the method to find the image "Which dir do I place the Image?" - I have been able, through the 'style sheets' to get the height, width and a border around where the image should be but I am just left with the old 'red cross' icon. 

I am using Cincom Visual Works 7.4.1nc with the 'SeasideForWebToolKit', 'VisualWave' and 'WebToolkits' parcels loaded. 

When I investigated the server created by VW: http://localhost:8008 and went to the configuration page for 'seaside' the Home Directory :$(VISUALWORKS)/web/examples, was displayed which through me off track for a while as Seaside must really be overriding this path as when, just by coincidence I pressed the submit button the $(VISUALWORKS)/web/examples actually became the Home Directory (and was actually able to pick files up from there) but then none of the Seaside webpages would load and I had to reinstall a previous VW Image.

Could someone please set me straight as I am so frustrated?

Original Post:

I am just trying to display an image in a webpage. Originally it was generated by a html file but now in Seaside (renderContentOn: html).

e.g. the image is located at:
c:\Program Files\Cincom\vw7.4.1nc\web
\examples

With html and having the image located in the same dir as the html file I used:
<img src="memberMail.gif" alt="Email Member"/>
Which displayed the image in web page generated by that html file.

I just can't figure out how to do it in Seaside.  I have been fine with all the other facets of converting my html files into Seaside but for some reason I can't figure this out - I'm afraid I'm just a beginner in Smalltalk/Seaside.

Cheers,

Dirk
_______________________________________________
Seaside mailing list


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Still Unable to Display an Image

dirk newbold
Thanks Michel,

All perfect now.

I think I know why it didn't work when you emailed me that piece of code the last time - I think I tried it after I went into the config page and pressed submit, thus changing the default Home Directory without me realising it.  Seems I know just enough to make myself dangerous.

Thanks Michel (and All) for your help and patience - also thanks for the further explaination on the configuration of sites it really helped further my understanding of the Seaside framework.

Cheers,

Dirk



On 4/25/07, Michel Bany <[hidden email]> wrote:
Hi Dirk,

Assuming that
(1) you have a standard Seaside install, as you said,
(2) you have a file named 'memberMail.gif' in folder c:\Program Files\Cincom\vw7.4.1nc\web\examples\

Then
(a) you should be able to see you picture when pointing your browser to
<a href="http://localhost:8008/memberMail.gif" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost:8008/memberMail.gif
(b) you should also see it at
<a href="http://localhost:8008/seaside/memberMail.gif" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://localhost:8008/seaside/memberMail.gif
(c) you should also see it as part of a Seaside component if the rendering code contains
html image: '../memberMail.gif'

Regarding the configuration of the sites, you would need to read the WebToolkit documentation.
This is a pdf document named 'WebAppDevGuide.pdf' and located in the doc folder.
The document explains how to sites are defined using *.ini files in the web folder.

You will then notice that the 'seaside' site is not defined using an *.ini file.
Instead it is created programmatically during the installation of Seaside to minimize the amount of setup for beginners.
It is also recreated each time you bring up your VW image.
The code that creates the 'seaside' site can be found in method AAADocumentation>>createWebSite.
In this method you will notice this statement
configParameters at: 'directory' put: default directoryName.
which means the the home directory of the 'seaside' site is the same as the home directory of the 'default' site.
See in 'default-site.ini' directory = $(VISUALWORKS)/web/examples
This remark should explain (b) above.

An advanced Seaside user will probably setup Seaside sites using the *.ini files.

To define a Seaside site using an *.ini file, you will need to create a new file, say 'mySite.ini'
with some contents like this
[configuration]
directory = D:/mySite
environment = MyNameSpace
description = My Seaside site
home = startpage.html
[logical-names]
app = servlet/SeasideServlet
Next you will need to update the ' webtools.ini' file to include that line
mySite = mySite.ini
Finally, you will need to force WebToolkit to reread its config files by going to
<a href="http://localhost:8008/configure/manageServer" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost:8008/configure/manageServer
and follow the instructions, or go directly to
<a href="http://localhost:8008/configure/resetConfiguration" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost:8008/configure/resetConfiguration

Place your static files in the folder defined in the mySite.ini file (directory =)

Once this is done you can go to you site using
<a href="http://localhost:8008/mySite" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://localhost:8008/mySite
or
<a href="http://localhost:8008/mySite/app/browse" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost:8008/mySite/app/browse

Let me know if this helps,
Michel.

I posted the question below last week and although I had may tips (a lot went over my head) I am still unable to display an image in a webpage generated by Seaside. 

I have tried all sorts of variations on the 'image' method but still can't get the method to find the image "Which dir do I place the Image?" - I have been able, through the 'style sheets' to get the height, width and a border around where the image should be but I am just left with the old 'red cross' icon. 

I am using Cincom Visual Works 7.4.1nc with the 'SeasideForWebToolKit', 'VisualWave' and 'WebToolkits' parcels loaded. 

When I investigated the server created by VW: <a href="http://localhost:8008" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost:8008 and went to the configuration page for 'seaside' the Home Directory :$(VISUALWORKS)/web/examples, was displayed which through me off track for a while as Seaside must really be overriding this path as when, just by coincidence I pressed the submit button the $(VISUALWORKS)/web/examples actually became the Home Directory (and was actually able to pick files up from there) but then none of the Seaside webpages would load and I had to reinstall a previous VW Image.

Could someone please set me straight as I am so frustrated?

Original Post:

I am just trying to display an image in a webpage. Originally it was generated by a html file but now in Seaside (renderContentOn: html).

e.g. the image is located at:
c:\Program Files\Cincom\vw7.4.1nc\web
\examples

With html and having the image located in the same dir as the html file I used:
<img src="memberMail.gif" alt="Email Member"/>
Which displayed the image in web page generated by that html file.

I just can't figure out how to do it in Seaside.  I have been fine with all the other facets of converting my html files into Seaside but for some reason I can't figure this out - I'm afraid I'm just a beginner in Smalltalk/Seaside.

Cheers,

Dirk
_______________________________________________
Seaside mailing list
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
Seaside mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside