[Seaside] CSS style not applied until reload
jfitzell at gmail.com
Wed Apr 14 06:56:06 UTC 2010
On Tue, Apr 13, 2010 at 9:56 PM, Mortensen Sigrid E. <
sigrid at selfhelpsoftware.com> wrote:
> Okay, well... I have a follow-up question.
> It turns out that the problem is not so much that the children are being
> added dynamically, as it is that the component the children are in is being
> added to the page via an SUUpdater. When an anchor is clicked, I'm using
> the updater to redisplay only the portion of the page that has that
> Is there any way to update the style when this happens? I've looked at
> #updateRoot: but it's not clear how I could call that or where I could find
> the root to pass as a parameter.
No. The style methods are called when writing out the <head> section of a
document. Obviously this only happens when the full page is being rendered,
so the issue is that your component isn't returned by #children at that
point. If you know all the components that might be displayed later, you
could possibly return them all from #children but this doesn't work if
you're creating the components on the fly, of course.
I mean, ok, with Ajax you can do whatever you want, so certainly there would
be some way you could add styles to the <head> of the document but you'd
have to write some JS to do it and it seems fairly kludgy.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside