[Seaside] How to ensure a script appears only once on page?

Sebastian Sastre ssastre at seaswork.com
Wed Mar 19 16:09:52 UTC 2008

Hi James,

	I don't use YUI components (yet?) but I'm sure trying to control the
render flux to solve that problem is not a path which I like to take.

	If I understood well your scenario I've solved that by decoupling the
"configuring scripts time" from "render time" in a sub hierarchy of seaside

	Achieved that, I'm able to "wire" arbitrary scripts at any
(pre-render)time with a guarantee of the hierarchy which make they to be
rendered properly (ocurrences and sequence).

	May you ponder to make something similar?


Sebastian Sastre


> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre 
> de James Foster
> Enviado el: Miercoles, 19 de Marzo de 2008 02:00
> Para: seaside at lists.squeakfoundation.org
> Asunto: [Seaside] How to ensure a script appears only once on page?
> I'm looking at some of the YUI components, specifically the calendar  
> widget, and am struggling with how to create a script. As I 
> understand  
> the YUI library, I am supposed to create a Javascript that 
> references  
> each of the calendar widgets on my page. The script has the general  
> format of (begin, middle, end), where the middle has a 
> variable amount  
> of code but the begin and end are fixed. My problem is that I might  
> have calendar widgets on various components, and the 
> components should  
> not each add the script, because then there would be multiple begins  
> and ends.
> Now, there might be a work-around for the YUI calendar 
> situation, but  
> I have a more general question: Is there some way to hook in to the  
> beginning or end of a render process? I've come up with a crude  
> approach where each component notifies the session at the beginning  
> and end of a render and the session keeps track of the first in and  
> then lets it know when it is the last out. Are there any other good  
> ideas?
> James
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list