[Seaside] Re: #urlForDocument: w/o canvas?

Sebastian Sastre ssastre at seaswork.com
Wed Oct 15 17:17:08 UTC 2008

> > I don't see where you are changing components during 
> render. Just a little
> > refactor to clean up your component.
> The "swf variables: (self ofcVariables: html) jsonString." in 
> #renderContentOn: changes the components state to reflect the 
> "new"(?) 
> #urlForDocument: value before rendering it.
I don't use the swf object you mention. In the render phase is ok to create
objects on the fly that will help you render a component. Scriptaculous way of
adding javascript in Seaside applications use and abuse from that. You can use
the wrapper as a dispensable thing that is initialized with fresh state (of that
dispensable thing). Note that this will be different from changing state of the
component itself. Think of a scriptaculous effect. It is created, configured
passed as paramenter and it only will last for that render.
If your wrapper is usable like that, then it would be perfectly fine to use one
on the fly. Check if is really justified to make that wrapper to be placed in an
inst var of your component. If not, remove it and use as if it where an effect
or whatever. 
If it really justified that every instance should be part of the component. It
will be considered (sub)state. In such a case I can understand your worry about
thinking better where to set the state.

> renderContentOn: html
>    swf variables: (self ofcVariables: html) jsonString.
>    html render: swf
> Thanks for your help,
> Udo



More information about the seaside mailing list