mike_x_
mike_x_

Reputation: 1929

How can i install jquery and jqueryUI files in XPages?

I have downloaded jquery and jquery ui files and i want to import them in my server as a "global library".

I want to add my files on the server so as to be globally visible and import them in any XPage.

( I dont want to reference them from the cdn with http, or add the files from my computer as a resource each time or add them only in a specific theme. )

For example: i could place the files in \domino\js\jQuery and \domino\js\jQueryUI or any other folder in the file system and then add them from any XPage from resources tab.

Can i do it somehow?

Can it be even better, for example:

Upvotes: 1

Views: 1208

Answers (2)

David Leedy
David Leedy

Reputation: 3593

Copy the files to WebContent in package explorer.

Reference them in the headTag of the page... something like:

<xp:headTag tagName="script">
            <xp:this.attributes>
                <xp:parameter name="type" value="text/javascript" />
                <xp:parameter name="src" value="jquery-1.11.1.min.js" />
            </xp:this.attributes>
</xp:headTag>

Make sure resource aggregation is turned ON.

Upvotes: 1

Oliver Busse
Oliver Busse

Reputation: 3395

If OSGI plugin is an option then try to use the Bootstrap4XPages plugin. It contains jquery libs as well. Is that a Domino 9 server?

Upvotes: 3

Related Questions