On Mon, 2007-06-11 at 11:25 +0200, Martin Grotzke wrote:
> Thanx for this explanation, Adam!
> 
> I just set clientValidation to false for my form, however, the js files
> are added to body. Is it somehow possible to tell T5 not to add
> these libraries (or scriptaculous.js) to the body?
Ouuups, sorry, my fault! There was still another form in our layout
template that didn't have the clientValidation="false" - now I've set
this and js libs are added to the body - really cool!

Thanx for your help,
cheers,
Martin


> 
> Otherwise, as a very ugly hack, it should be possible to replace the
> js files by empty ones, as long as we're using none of them...
> What do I have to add to the configuration in
> contributeApplicationDefaults to specify the
> "js/empty/scriptaculous.js"? Or where do I find documentation concerning
> this question?
> 
> Thanx a lot,
> cheers,
> Martin
> 
> 
> On Mon, 2007-06-11 at 01:39 -0700, Adam Ayres wrote:
> > >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/

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to