[Seaside] Problem getting render methods to be functional

Avi Bryant avi at beta4.com
Tue Feb 4 18:48:46 CET 2003


On Tue, 4 Feb 2003, Derek Brans wrote:

> Avi, Julian,
>
> I'm wondering what can or should not be done in a render method.
> Creation of components I gather are out.  What other sorts of things
> constitute "important side effects"?

Anything that affects the value of a StateHolder.  The problem is that
currently the StateHolders are snapshotted before the rendering starts, so
any changes made during the rendering will get lost.

This is not an ideal restriction, and I'd like to just get rid of it, but
that'll take a fair amount of reworking, so don't expect to see it fixed
right away.

> The change in user happens somewhere else in the application so my
> component couldn't know about it until render time.  At the beginning of
> my render method in the main component, I detect a change in user and
> create a fresh tabComp (based on the user's permissions).  That's giving
> me problems related to lazy initialization as before.

Is the tab component inside a Container?  I wouldn't expect it to be...
and if it's not this shouldn't actually break anything.

Avi



More information about the Seaside mailing list