Description
I would like to have an enhancement to XhtmlHelper.linkJavascript() that supported many different popular JavaScript libraries. For example, I'd like to do something like:
getXhtmlHelper().linkJavascript(context, component, writer,
Mechanism.CLASS_RESOURCE, "dojo", "0.3.0");
getXhtmlHelper().linkJavascript(context, component, writer,
Mechanism.CLASS_RESOURCE, "prototype", "1.4.0");
getXhtmlHelper().linkJavascript(context, component, writer,
Mechanism.CLASS_RESOURCE, "scriptaculous", "1.6.1");
And rest assured in the knowledge that the proper script elemnets will be rendered out iff no-one else on this request has asked for these scripts to be rendered.
If we make jMaki and jsf-extensions use this, then we can save a lot of code and bandwidth.