[Seaside] scriptaculous strange code ?
Cédrick Béler
cbeler at enit.fr
Thu Mar 16 13:13:10 UTC 2006
Hi
Paco a écrit :
> Hi,
>
> I try to figure out how this scriptaculous code works and I am not
> getting the point.
> Here is the rendering code of the SUSortableTest :
>
> renderContentOn: html
> html paragraph: 'Drag and drop items to re-arrange!'.
> html div
> style: 'float: left;';
> with: [ self renderList: left named: 'left' titled: 'Left
> List' on: html ].
> html div
> style: 'float: left;';
> with: [ self renderList: right named: 'right' titled:
> 'Right List' on: html ]
>
> It's easy to see what it produces but if I copy that code in one of my
> class, Seaside is generating some 'with' tags in html source. And it
> is normal because the WAHtmlRender doesn't understand the message #div
> and #with:. So the #doesNotUnderstand: is invoked
Scriptaculous is using exclusively WARenderCanvas (the new rendering
framework) and not WAHtmlRenderer (the old one still usable and the
default one too)...
To use it, you need the last seaside 2.6a3-lr.28, then the package
scriptaculous
and in your application, you have to use specify in the instance side of
your component
rendererClass
^ WARenderCanvas
if you want to make it the default for all your seaside app, put this
method in WAPresenter...
After, the difference is mainly that you use cascading messages (it is
to limit the explosion of WAHtmlRenderer protocol)
html div
style: ; (<-- ;)
with: [].
The order is not important exept for with: or text: that have to placed
last (if I have well understood :) )
see
http://lists.squeakfoundation.org/pipermail/seaside/2005-June/005260.html
hope this helps
see you
Cédrick
--------------------------------
L'ENIT vous invite a sa journee portes ouvertes le 17 mars 2006 de 13h30 a 19h30
Enit , 47 avenue d'Azereix 65000 Tarbes
Bus N°1, arret ENI
More information about the Seaside
mailing list