Oliver, I think you misunderstood what he said.
All you need to do is include jquery in every page by putting the <script> tag in the html under your script tag for your gwt application. I presume this is either in an html file somewhere or part of an html template. Just modify the html to include jquery and have none (not tuna, not chicken) of your modules include it (it's included already). If a module doesn't use it there shouldn't be any problems with including it. Ian 2009/1/30 Olivier Dagenais <[email protected]> > > We had something like that and it was that very scenario which exposed > the bug I'm trying to address: Another GWT application depended only > on the "tuna" GWT module and said "tuna" module did not have a > dependency on jQuery until recently. An upgrade of the "tuna" module > (to the jQuery-dependent version) thus broke the second GWT > application. Having the "tuna" GWT module explicitly call out jQuery > is fine until there's something like the "chicken" GWT module, but > with my patch, yes, there are two requests, but no GWT app that uses > either module risks breaking. :) > > Cheers, > - Oli > > On Thu, Jan 29, 2009 at 8:46 PM, Daniel Friesen > <[email protected]> wrote: > > > > Why can't you just always load jQuery beforehand, then neither of the > > libraries should need to load jQuery. Something requiring jQuery > > shouldn't imply that it loads it, rather it would be better if jQuery > > was loaded separately on it's own. > > Even if you make jQuery safe to include more than once you're still > > causing an unnecessary request when you try and load it a second time > > even though it's already loaded. > > > > ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com] > > > > Olivier Dagenais wrote: > >> Hi, > >> > >> We're using jQuery with GWT and, long story short, here's what happens: > >> > >> A third-party GWT module (let's call it "chicken") includes jQuery and > >> makes some additions to the jQuery object. Along comes another GWT > >> module (let's call it "tuna") that also includes jQuery and, without > >> the ability to control the order in which both modules are loaded, the > >> contents of jquery.js is included/executed twice during page load, > >> resulting in the loss of the additions made by the "chicken" module. > >> > >> In other words, the <body> element would contain something like this: > >> > >> <SCRIPT language="javascript" src="gwt.application.nocache.js"> > </SCRIPT> > >> <SCRIPT language="javascript" > >> src="http://localhost:8888/gwt.application/js/chicken/jquery.js"> > >> </SCRIPT> > >> <SCRIPT language="javascript" > >> src=" > http://localhost:8888/gwt.application/js/chicken/jquery.additions.js"> > >> </SCRIPT> > >> <SCRIPT language="javascript" > >> src="http://localhost:8888/gwt.application/js/tuna/jquery.js"> > >> </SCRIPT> > >> > >> Now, since the "tuna" module is not always used alongside the > >> "chicken" module, it can't not (i.e. it must) include jsquery.js, and > >> the reverse is also true. > >> > >> We think the simplest and best way to fix this problem is simply to > >> have jquery.js be safe to include more than once and thus we are > >> proposing the attached patch, which makes all of [the generated] > >> jquery.js conditional upon having not executed already. > >> > >> > >> HTH, > >> - Oli > > > > -- ======================================= 株式会社ビープラウド イアン・ルイス 〒150-0012 東京都渋谷区広尾1-11-2アイオス広尾ビル604 email: [email protected] TEL:03-5795-2707 FAX:03-5795-2708 http://www.beproud.jp/ ======================================= --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
