>From what I can tell only the Form component uses prototype and
scriptaculous when the clientValidation parameter is set to true (which
is the default).  The tapestry.js that is added as part of the Form
component uses some of the element and event helper methods from
prototype and some of the effects from scriptaculous.

The way the scriptaculous library works is that when the base
scriptaculous.js is included in a page all of the various files for the
library (builder, controls, dragdrop, etc) are dynamically added as
additional script tags within the body of the HTML, no matter if the
individual components are used or not.  This has the negative side
effect of making the rendered page code ugly (and difficult to
troubleshoot in firebug) as well as creating 5 additional server
requests.

I would suggest replacing the default prototype and scriptaculous
libraries with a minified (and compressed) version:

http://groups.google.com/group/prototype-core/browse_thread/thread/40e58
15f5bc5fba9

http://protoculous.wikeo.be/

Currently using one of these solutions that combines prototype and
scriptaculous is not possible with the Form component since it wants to
add a separate file for both prototype and scriptaculous.  However
adding compressed versions for each works.

Adam


-----Original Message-----
From: Martin Grotzke [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 11, 2007 1:02 AM
To: Tapestry users
Subject: Re: T5 included javascript libraries

Are these js files used at all? I ask as they increase loading time
and I'd like to remove them if they're not used...

However, wait 5 days and I'll ask how to start with ajax in T5 ;)

Cheers,
Martin


On Sun, 2007-06-10 at 23:50 -0700, Howard Lewis Ship wrote:
> You have some control, via contributions to the ApplicationDefaults
> service configuration, over where the files come from, so you can use
> a different version of prototype & scriptaculous than the ones
> provided with Tapestry.  However, we have yet to take a crack at an
> abstraction layer that would allow you to replace p&s with some other
> similar library, such as Dojo.
> 
> On 6/10/07, Martin Grotzke <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > T5 adds several js libraries to the body, e.g. prototype.js,
> > scriptaculous.js and others.
> >
> > Are they all required, or is there a possibility to affect
> > which libs are added to the body?
> >
> > Thx && cheers,
> > Martin
> >
> >
> >
> >
> 
> 
-- 
Martin Grotzke
http://www.javakaffee.de/blog/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to