Web UI Framework

How to Register a JavaScript Resource

Updated: October 16, 2020

This page talks about using JavaScript inside the Nuxeo web application (the back office). If you want to build a JavaScript application (with jQuery, Node, angularJS, ...) you should follow our Nuxeo JavaScript Client page.

To make a JavaScript resource available in your JSF page, you need to register the resource and to add to the theme view you are using.

Registering a JavaScript Resource

To register a JavaScript resource you give it a name a the path of the resource inside your JAR.

<extension target="org.nuxeo.theme.services.ThemeService"
<resource name="jquery.js">

Using a Resource in a View

You can add a resource to the contribution of your view:

<extension target="org.nuxeo.theme.services.ThemeService" point="views">

<view name="myview" template-engine="jsf-facelets">

JavaScript in WebEngine

If your webengine module extends either base or admin, then the prototype and jQuery libraries are already provided.

Available Javascript Libraries

It is not necessary to add resource for common JavaScript libraries as they are already contributed. We also recommand to use the libraries below if needed:

  • prototype
  • jQuery 1.4.4

We'd love to hear your thoughts!

All fields required