so RenderSupport is deprecated, the use of addScript is discouraged and I
think I 've learned something new...
thanks Howard,
Nicolás.-
On Tue, Nov 9, 2010 at 10:58 PM, Howard Lewis Ship wrote:
> defined on the Tapestry.Initializer object, to be executed with a
> set of parameters.
>
Sorry, Nicolas, you are quite wrong.
The difference is that using RenderSupport. addScript() you are adding raw
JavaScript that gets executed when the page loads.
When using RenderSupport.addInit() you are referencing client-side
functions, defined on the Tapestry.Initializer object, to be execut
The execution moment difference is a consequence of the
only real difference, which afaik is how they add the script, one as handler
of the on load event (add init),
the other just as a
Thank you for your responses
So, is the execution moment the only diference ?
Thanks in advance guys
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Diference-between-addInit-and-addScript-tp3256418p3257752.html
Sent from the Tapestry - User mailing list archive at Nabbl
Some components need specific js init.
if you have a look inside Tapestry.js and search for Tapestry.Initializer
you will find
/** Container of functions that may be invoked by the Tapestry.init()
function. */
Tapestry.Initializer = {
ajaxFormLoop : function(spec)
{
},
and lots of
I believe the difference is that
addInit
adds your javascript on an onLoad event handler of the current page.
while
addScript
adds your javascript at the very bottom of the page (last element before
closing body), within a