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?
Regards
Klaus