Today I took a new jQuery plugin that I was playing with from an R8.5.3 environment where it worked, to an R9 environment and it failed – I figured it had something to do with something I had been reading about over the last month and in fixing my problem this lead to a more serious realization that I KNOW other people are also going to come across.
A brief scan of the last month’s discussions on Xpages and jQuery Mobile 1.3 reveals a number of posts started by Dave Leedy regarding the use of IBM Notes Domino 9 and jQuery Mobile 1.3
What’s going on?
I saw the following Tip from Sven Hasselbach (very smart man!) on Dave Leedy’s blog post
Looks like an AMD loader problem with Dojo & JQM. I have tried out to disable the Factory scan in a test page and this worked for me. To do this I have added the following parameters in the xsp.properties:
Maybe this can help you with your problems in ND9.
This lead me to this bug report
make dojo work with other AMD loaders
Which then lead me to the realization that this is a bigger issue than just JQM 1.3 and I solved my problem and here is how.
Within the Package Explorer (Window—open perspective –> xpages) in the WebContent folder for your database you will find the xsp.properties file (as described http://heidloff.net/home.nsf/dx/06172011015521AMNHE8Y7.htm)
Click to open the Source Tab
and enter the following
And Save – that’s it
If you look at the source code of the created XPage you will see that the new parameter has been added to the script tab creating the dojo.js as a djConfig property
doing a quick search explains what this property does
“For example, we could disable the amd factory scan (scanning the module for CommonJS require(module) statements to load as deps) with…”
Not only does that solve the problem with jQuery Mobile, it also solved my problem with the jQuery Table plugin which I wanted to use, which used require.js to load the jQuery dataTable plugin.
thank you Sven Hasselbach (again!)