[Seaside] children & egg problem
avi at beta4.com
Mon Aug 30 01:25:08 CEST 2004
On Aug 29, 2004, at 6:48 PM, radoslav hodnicak wrote:
> In 2.5, the complete root component with its children must be ready
> authentication decoration kicks in - but I can't initialize my
> components before I know who is logged in. In 2.3 this was not a
> because there was no #children. Suggestions?
If nobody's logged in, just return #() from #children, because you know
nothing will be rendered anyway due to the auth decoration.
> Btw, I don't know where this fascination with wrapping things into
> things comes from, but do I have to remind you what happened to the
> current VisualWorks UI framework ("Wrapper")?
> Right, it's being rewritten ;-)
Rado, don't go anywhere, we need questions like that ;).
But there's no wrapping going on, exactly: the whole point of the
decoration system is that parents can access children directly without
worrying whether or not they've been decorated. This was, in fact, an
attempt to get *rid* of the wrapping that was happening in 2.3 with,
eg, #withMessage: and #validateWith:, where you ended up pointing to a
MessageFrame or ValidationFrame instead of the actual component you
cared about. Here, there's a clear separation between wrapper and
component, and you can usually ignore the wrappers if you want to.
IIUC, this is closer to Pollock than Wrapper.
Still, I freely admit that 2.5 is more complex than 2.3, and complexity
is generally a bad thing. As you find concrete ways in which it gets
in your way (and there will be more of them, I'm sure), please do let
More information about the Seaside