Well, actually, there is none. The reference is filtered only by URL. You can submit a feature request for adding an ID to it.
-Matej On 7/19/07, James McLaughlin <[EMAIL PROTECTED]> wrote:
Is there anyway to set the id or some other token when using a JavascriptResourceRef? Both wicket-datetime and wicket-contrib-yui use it to load script. thx, jim On 7/19/07, Matej Knopp <[EMAIL PROTECTED]> wrote: > To filter header contribution in wicket there you can set the id > attribute of the script. Otherwise it will be filtered by URL. So if > you have the contribution twice with same javascript url, it will be > filtered. > > -Matej > > On 7/19/07, James McLaughlin <[EMAIL PROTECTED]> wrote: > > The injecting flag is used only by the new yuiloader functionality, > > which will resolve and load library dependencies. Before this, you > > would need to specify each dep by hand. For some reason, the yui event > > prefers to use document.write to create the script node over > > document.createElement if not injecting. This doesn't apply to > > versions < 2.3, so on its own this is no reason to rush upgrading. > > > > In other news though, there is a conflict in yui libs when using > > wicket-datetime and wicket-contrib-yui together, since they both will > > always require the yahoo and dom libs, including them twice. Is there > > some way we can trick the headercontributor subsystem into recognizing > > libs included by both projects and filtering them? Maybe share an id > > or key? > > > > best, > > jim > > > > On 7/19/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > > > the current version (2.2) isn't made for injection (what we could do for > > > example if we have an ajax tabpanel) > > > > > > But 2.3 which is about the get released i think says this in the code: > > > > > > // If the library is being injected after window.onload, it > > > // is not safe to document.write the script tag. Detecting > > > // this state doesn't appear possible, so we expect a flag > > > // in YAHOO_config to be set if the library is being injected. > > > if (("undefined" !== typeof YAHOO_config) && > > > YAHOO_config.injecting) { > > > > > > I cant find much info about that injection flag currently anywhere else. > > > > > > But i guess every lib that uses yahoo should upgrade asap to the 2.3 (now in > > > RC: http://sourceforge.net/project/showfiles.php?group_id=165715) > > > and should do something like: > > > > > > YAHOO_config = { > > > listener: mycallback // this is already something you can do in 2.2 if > > > needed. > > > }; > > > YAHOO_config.injecting = true; > > > > > > and only when we are in an ajax request.. > > > > > > johan > > > > > >