private static void addBodyEndJavaScriptRef(
     FacesContext facesContext, AddResource addResource, String uri) {
   addResource.addJavaScriptAtPosition(facesContext, AddResource.BODY_END, "/js/" + uri);
 }
 private static void addJavaScriptRef(
     FacesContext facesContext, AddResource addResource, String uri) {
   addResource.addJavaScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, "/js/" + uri);
 }