}
private static LibraryFunction getScriptResource(FacesContext facesContext, Class<?> javaClass) {
ResourceHandler resourceHandler = facesContext.getApplication().getResourceHandler();
String resourceName = javaClass.getSimpleName() + ".js";
Resource facesResource = resourceHandler.createResource(resourceName, ORG_RICHFACES_CSV, TEXT_JAVASCRIPT);
if (null != facesResource) {
final String functionName = firstToLowerCase(javaClass.getSimpleName());
return new LibraryFunctionImplementation(functionName, resourceName, ORG_RICHFACES_CSV);
} else {
return NO_SCRIPT;