[FollowUp] jQuery Mobile Seems incompatible with XPages in Domino 9.0

This is a follow up on an article, David Leedy wrote yesterday

I recently ran into an issue with Domino 9 and jQuery Mobile. I had to completely deactivate Dojo. Otherwise the mobile components did not render. But doing so, I would lost all of the XPages functions like partial refresh et al. On friday, my colleague at BCC asked a question on StackOverflow regarding a problem with jQuery Mobile. He finally got it working by ACTIVATING Dojo in the application.

Over the weekend, I tried to find out, what was going on. Here are my findings

In our project we are using jQuery 1.9.1 + jQuery Mobile 1.3.1 and the application needs to work even on Domino 8.5.1. This part works. No problem here.

There is a difference in the development platform. While my colleague uses IBMNotes/Domino 8.5.3, I use IBM Notes/Domino 9.

ND 8.5.3 comes with Dojo 1.5.1 and ND 9 has Dojo 1.8.1 as its default. Should not make any difference …

The first hint came from Mark Roden

markr

jQuery Mobile uses attributes like data-role=”page” and if Mark was right, using a different namespace , changing the attributes to data-bcc-role=” … should fix the issue. To make a long story short; it does not.

Next, I installed the application on ND 8.5.1 FP3 and it worked as expected. The only thing that did nor work was pagers in views and other events.
This is caused by the createForm=”false” entry in the page root. This setting was recommended bay several members of the community; so I just folowed their recommendation.

To make events work, you have to put a xp:form tag around your view control. Tim Tripcony posted an interesting entry on StackOverflow. I recommend, that you read this article.

After adding the tag to the controls, everything worked just fine.

Next was to upgrade the server step by step to release 9. Everything worked fine until I upgraded the server to version 9. I then moved the dojo-xxx folders from the previous installations to the IBM\Lotus\Domino\data\domino\js folder. Next I configured the server to use a specific Dojo version by editing the xsp.properties file in IBM\Lotus\Domino\data\properties.

With xsp.client.script.dojo.version=1.5.1 my application started to work on ND9 without any issue. Here is an overview of which version of Dojo and Domino worked, which had issues and which combinations did not work at all.

dominoDojo

But configuring the whole server to use a different Dojo version is not a good idea. In ND 9, you can also set the dojo version in xsp.properties in the application.

So my workaround for now is to set the dojo version to 1.5.1 in the application. ND9 has Dojo 1.5.2 installed in the IBM\Lotus\Domino\data\domino\js folder, but using this version, events are not triggerd. You will see the following error in WebInspector console in Safari.

dojo152

 

One thought on “[FollowUp] jQuery Mobile Seems incompatible with XPages in Domino 9.0

  1. Just for clarification: You can define the dojo version on application level in Domino versions prior version 9.
    Dojo 1.5.2 has no XSP libraries, but you can copy the folder dojo-1.5.1/ibm/xsp to your dojo-1.5.2/ibm/ folder. Then your XPages functionality should work.
    BTW: what will happen if you are using the Dojo Lite version?

Comments are closed.