Seaside #updateRoot: from development env.

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Seaside #updateRoot: from development env.

Postby PhotonDemon » Fri Dec 12, 2008 11:31 am


I am playing with a pull down menu. When I use the #style method to supply the stylesheet, all works well. When I try to use #updateRoot: to point to a CSS file, a reasonable looking link is placed in the head section but the CSS file isn't loaded by the web browser. I assume I need to do something with SST so it will server up the CSS file but I'm not sure what? Can someone give me a hint as to where to put the CSS file or how to tell SST where to fine it and that it is okay to send it?

Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Seaside #updateRoot: from development env.

Postby klaus » Tue Feb 03, 2009 3:40 am

Hi Lou,

we solved this in our project with a own class subclassing #WAFileLibrary. In this class we implemented methods to load pictures and css-files from disc. The contents of the pictures (jpgs, bitmaps..) has to be converted into a ByteArray.
The #updateRoot: method in our WAComponent classes look then for css-files like this:
Code: Select all
updateRoot: anHtmlRoot
   super updateRoot: anHtmlRoot.
   anHtmlRoot stylesheet url: OurOwnCpcWAFileLibrary / #ourfileCss
#ourfileCss is a symbol is derived from the original filename ourfile.css

Loading pictures:
Code: Select all
renderContentOn: html

    html div
   id: 'banner';
   class: 'banner';
   with: [
       html image
      altText: 'This is a banner';
      url:  'http://localhost:8788/seaside/files/OurOwnWAFileLibrary/banner.jpg']
Therefore in class #OurOwnWAFileLibrary we implemented he method #bannerJpg to return the contents of the file banner.jpg.

This prevents us to store pictures and css files into our source code. But if we make a change to one of these files, we have to clear the browser caches of Firefox, Internet Explorer etc. Any ideas to delete this caches from Seaside?


Klaus Breker
Currently working for clearstream (Deutsche Börse Group)
Posts: 38
Joined: Fri Nov 28, 2008 1:16 am
Location: Bonn

Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest