Laurie, We use a Scriptlet API down in : oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs ... the basic gist of which is that a Renderer can say "hey, I need function foo()", and the Scriptlet API figures out whether that means importing a lib, or writing out an in-place script, and if so, whether it's already been rendered once.
Instead of using a Filter to inject into <head>, we currently blow off the notion that <script> elements can only be in <head>. Evil, perhaps, but there's not a browser that really cares, and practical considerations trumped HTML purity. But since the details are hidden inside of the Scriptlets, they could instead just add the scripts to a list that later gets injected by a Filter. Note that this code is currently in "adfinternal", which means that it is not a public API, and is not considered legit for code external to ADF Faces to extend. One of my major goals for the ADF Faces codebase is to extract a public API from the current adfinternal rendering APIs, which reminds me I need to post some support for John's api/impl split e-mail... :) -- Adam On 2/21/06, Laurie Harper <[EMAIL PROTECTED]> wrote: > The Tomahawk components 'inject' Javascript file references into the > <head> section of the response by using a filter to buffer and > post-process the response. I'm assuming ADF Faces has some mechanism for > injecting Javascript too, but I can't seem to track it down... > > I've found the code that handles serving static resources, just not the > code responsible for injecting references to Javascript files. The > reason I'm looking for it is so I can make a component library I'm > working on use it. > > Can anyone give me a pointer to the right area in the ADF Faces code, or > even better a quick explanation of how to use it to do what I want? > > Thanks, > > L. > >