[Seaside] WASystemConfiguration

Philippe Marschall philippe.marschall at gmail.com
Mon Oct 5 19:54:13 UTC 2009


2009/10/1, Ramiro Diaz Trepat <ramiro at diaztrepat.name>:
> This is an easy one I guess.  Indeed it may be solved in a number of ways, I
> just wanted to ask what is the standard way.I guess this is a standard set
> up issue to solve with WASystemConfiguration subclasses for anyone
> developing with Seaside.
>
> If I have resources on a server, in a simple structure like:
>
> /css
> /img
> /js
>
> but for development I just use komanche and WAFileLibrary, which holds all
> resources in a single "virtual" path:
>
> /file/LibraryName/resources
>
>
> Then, in my root component I would like to have something like
>
>
> RootComponent>>updateRoot: anHtmlRoot
>     super updateRoot: anHtmlRoot.
>
>     "in case i am in dev"
>     anHtmlRoot stylesheet url: MyFileLibrary / #styleCss

That's an uncool pattern. I know the tests use it everywhere but you
shouldn't use it. It's better to implement #selectorsToInclude in
MyFileLibrary and answer #(styleCss). The best way is probably to use
#resourceUrl: 'css/style.css'

> Should I try to get which subclass of WASystemConfiguration is installed and
> build the relative path inside #updateRoot:  ?
> Or is there a different way to sort this out?

There are multiple ways you can go. If you use Comanche I'd use
#resourceUrl: and a Comanche config to serve the files from disk.

Cheers
Philippe


More information about the seaside mailing list