Okay, I am doing something wrong, it is not broken.

If I am having a custom script that I do not want in Common for a core
component, how can I do it?

I am adding JS code for my panelBorderLayout enhancement that is only
needed for IE6. So I want to send it down from the renderer after
checking the version.

Right now I have the JS code in a string in my renderer in a class
extending Scriptlet. I would like to have it in a JS file instead.

How can I use LibraryScriplet to add this file from the renderer?
Where must I do all the registration for this new JS file so that the
resource loaders find it correctly?

Thanks,
Andrew



On Fri, Apr 4, 2008 at 5:07 PM, Andrew Robinson
<[EMAIL PROTECTED]> wrote:
> A renderer using LibraryScriptlet is getting the URL:
>  /trinidad-demo/adf/jsLibs/DebugApacheChart1_2_8.js
>  instead of:
>  /trinidad-demo/adf/jsLibsDebug/ApacheChart1_2_8.js
>
>  The former is what is added to the page. The latter is what is being
>  generated by the build. As a result, any component using
>  LibraryScriplet will break if JS debugging is turned on.
>
>  Anyone know why this is and if one was changed, why the other was not?
>
>  It would be hard to fix the LibraryScriplet as it would require an API change
>
>  Code snippets from LibraryScriptlet.java:
>
>   protected String getLibraryName(
>     FacesContext        context,
>     RenderingContext arc)
>   {
>     String libraryName = _libraryName;
>
>     if (_isDebug(context))
>       libraryName = "Debug" + libraryName;
>
>     return libraryName;
>   }
>
>   public static String getBaseLibURL()
>   {
>     return _JSLIBS_DIRECTORY;
>   }
>
>   static private final String _JSLIBS_DIRECTORY = "/adf/jsLibs/";
>
>  -Andrew
>

Reply via email to