[Seaside] Seaside + Comet

Esteban Robles Luna esteban.roblesluna at gmail.com
Sat Jan 20 15:10:04 UTC 2007

The problem is that till know I don`t understand some concepts of
seaside + scriptaculous. May be the best way is to copy some messages
that understands WebView and discuss them. The problem I have now is
that the stream is obviously close.

>>renderContentOn: aRenderer

| actualId  |
actualId:= aRenderer nextId.
self id: actualId.
"store the element"
self element: (aRenderer element id: actualId).
element render: [:r | self primRenderContentOn: r].

>>primRenderContentOn: aRenderer

| fid mid |

fid := aRenderer nextId.
mid := aRenderer nextId.
aRenderer form
             id: fid;
            with: [ aRenderer checkbox
             value: self model model value;
             callback: [ :value |  self model model value: value ];
onClick: (aRenderer updater
               id: mid;
               triggerForm: fid;
               callback: [ :r |  ]).
aRenderer label with: self model label text].


self element render:[:r | self primRenderContentOn: r].

Remember that, the invalidate is call after 5 seconds the first
request. I can´t find the implementation of html scriptaculous element
in the canvas. Which version are you using? My version is
Scriptaculous-lr.163.mcz 19 December 2006 3:24:29 pm for VW.

On 1/20/07, Lukas Renggli <renggli at gmail.com> wrote:
> > I want to reuse the renderOn: behaviour. For example the update
> > message to the component don`t have a reference to the render, so my
> > problem is to get a render in order to use the renderOn message.
> > How do I get the render in that context? is it possible?
> If you use
>     SUElement new
> the element won't be able to render, as it doesn't know the context.
> Therefor you should use the factory methods
>     html element ...
> or
>     html scriptaculous element
>     (the new way of doing it)
> what basically does the same but assigns the curent context to the
> element, so that it can do fancy stuff like rendering and registering
> callbacks.
> > * I have a process that periodically (5 seconds) sends an update
> > message to the component.
> Why don't you use the periodical updater then? Is there a difference
> between pulling every 5 seconds (AJAX, Scriptaculous, easy) and
> pushing every 5 seconds (Comet, relatively complicated and resource
> hungry)?

You are right. The problem is much more complicated. This work is for
a subject of the faculty. I`m trying to reuse the UIPainter of VW for
generating the UI for a web application ( with certain restrictions
and without taking into consideration resources ). So that to migrate
the same application to the web is just a matter of minutes. My
approach of solving the problem is to generate the typical UI on the
server. Then I build proxies of seaside for interacting with the UI (
of course a subset of the functionality ) and rendering. The main
objective is to use the same widgets, not custom displayOn: object`s.
Your help is really appreciated!

> Cheers,
> Lukas
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the Seaside mailing list