[Seaside] Weird problem with libraries

Philippe Marschall philippe.marschall at gmail.com
Wed Jul 15 05:03:09 UTC 2009


2009/7/15, Mariano Martinez Peck <marianopeck at gmail.com>:
> Hi folks,
>
> I have a problem with a library. I am using a Pier Gallery addon that uses
> Prototype.js, scriptaculus, builder, effects, etc. My application DOESN'T
> have SULibrary added. It has it's own library called DestinoMochilaLibrary
> with this method:
>
>
> DestinoMochilaLibrary>>selectorsToInclude
>     ^ #(destinoMochilaCss)
>
>
> Now, to be able to use that plugin I override the method updateRoot: like
> this:
>
> DestinoMochilaLibrary>>updateRoot: aHtmlRoot
>     super updateRoot: aHtmlRoot.
>     aHtmlRoot javascript url: '
> http://www.roard.com/lightbox2/js/prototype.js'.
>     aHtmlRoot javascript url: '
> http://www.roard.com/lightbox2/js/scriptaculous.js?load=effects,builder'.
>     aHtmlRoot javascript url: 'http://www.roard.com/lightbox2/js/lightbox.js
> '.
>     aHtmlRoot stylesheet url: '
> http://www.roard.com/lightbox2/css/lightbox.css'

If you're at this point a WAFileLibrary is really not what you want.
Put this code into the root component on your page.

updateRoot: aHtmlRoot
     super updateRoot: aHtmlRoot.
     aHtmlRoot javascript resourceUrl: '/lightbox2/js/prototype.js'.
     aHtmlRoot javascript resourceUrl:
'/lightbox2/js/scriptaculous.js?load=effects,builder'.
     aHtmlRoot javascript resourceUrl: '/lightbox2/js/lightbox.js'.
     aHtmlRoot stylesheet resourceUrl: '/lightbox2/css/lightbox.css'

And then configure the resource base url in your application and serve
them over your HTTP server.

Cheers
Philippe


More information about the seaside mailing list