Domino 8.5.3: Greater Power Over Dojo. Thanks IBM For Your Work

Home » Domino 8.5.3: Greater Power Over Dojo. Thanks IBM For Your Work

I’ve been rather busy today so I’m yet to upgrade to Domino 8.5.3 but there are a host of goodies in the new release, not least for XPages developers. While preparing for my session at Lotusphere last year one of the areas I looked at was managing the Dojo version used by XPages. With research I identified that it was possible to change the server version by modifying xsp.client.script.dojo.version in the xsp.properties file on the server, as covered in an article on the Application Development wiki. Anyone whose looked at the files in the Package Explorer will know there is also an xsp.properties file in each NSF. However, with Domino 8.5.2 setting xsp.client.script.dojo.version on the NSF had no effect. This meant that it was not possible to take advantage of new charting or mobile Dojo modules available in 1.5.0 without changing the Dojo version for the whole server, which could have unforeseen implications.

The good news is that with 8.5.3, this now works. One caveat in the gold release is that if you change the Dojo version you need to ensure “Use runtime optimized JavaScript and CSS resources” is unticked (in the xsp.properties this is xsp.resources.aggregate=false. This means that at NSF-level, as and when new versions of Dojo are released, it will be possible to immediately take advantage of new functionality without impacting the rest of the application. It also means it’s possible to downgrade the Dojo version on individual applications, if required.

So far, however, I have still been unable to modify the Dojo version on an individual XPage by using the head tag.

Also, at Niklas Heidloff blogged a few weeks ago 8.5.3 includes Dojo 1.6.1. When Dojo 1.6.0 was announced back in March I blogged suspecting that it would be too late to get into 8.5.3. As Darren Duke would say, kudos to IBM for their efforts in getting it into 8.5.3.

12 thoughts on “Domino 8.5.3: Greater Power Over Dojo. Thanks IBM For Your Work”

  1. 8.5.3 ships with Dojo 1.5.1 (I just installed the server and checked the directories) along with the older versions.

    I wonder if Niklas had a typo in the “1.6.1”?

    Howard

  2. To clarify, there are two new Dojo versions, 1.5.1 for the XPages runtime, and 1.6.1 for OSGi (you can find it in <program>osgisharedeclipsepluginscom.ibm.xsp.dojo.8.5.3.20110922_1130.jar

    – Thomas, IBM.

  3. Nathan is right. The beauty is that we could now even deploy future Dojo versions (e.g. 1.7) as OSGi bundles without having to wait for a new product release.

  4. The beauty of this approach is that you can downgrade the Dojo version for an NSF, if you really wanted to, to Dojo 1.5.1, which presumably also has the xspClientDojo and other IBM files. I’m assuming that the Dojo naming conventions of 1.5.1 and 1.6.1 are to avoid conflicts with any existing implementations of Dojo 1.5.0 because XPages always runs the highest numbered Dojo version, a nice plan.

    Of course, if you want to add your own Dojo modules, the plugin means you can’t put them on the server. The approach will be to store them in the NSF as script libraries or, for ease to support XPiNC and browser, as File Resources.

  5. Per Niklas (and I checked the rendered html in the gold release), 1.6.1 is served up for XPages. The files are stored in OSGI as a plug-in. I think CD5 served up 1.5.1 so IBM must have added this after CD5.

    My first comment was wrong.

    Howard

  6. @Howard yes, it was added post-CD5 and wonderfully highlights the power if the new OSGi plugin functionality.

    Incidentally, this is why you need to ensure “Use runtime optimised JavaScript and CSS resources” is unticked, otherwise you’ll still see Dojo 1.6.1 loaded from the plugin by Firefox. I only found this out myself just a couple of weeks ago, too late for anything to be done about it.

  7. An applications needs dojo.require(“dojox.lang.functional”); but it appears the dojox is not being found and I cannot see where the 1.6.1 files are or what they consist of give the path “/xsp/.ibmxspres/dojoroot-1.6.1/dojo/dojo.js or whatever is in or around there.

    Anyone have an idea about how to include or be sure to include the dojox files? Is there a resource include statement, where is the resource, etc etc etc. Absent the actual files and their structure, I can’t be sure of where or what the files are.

  8. Dojox.lang.functional should exist on the server. It’s in the plugin. The best way to include it is to add it as a resource to the XPage or Custom Control. I can’t remember if you have to go to the All Properties panel to get the option of Dojo Module when you add a resource. It should be there, if not on the Resources tab. You can then add the Dojo Module, set the name as “dojox.lang.functional”. You can also define when it should be included programmatically, if you wish.

    If you want to see what the files are or where, there are two ways of doing it. If you’re server is 8.5.3, look at the OpenNTF project “Dojo Debug Kit for Domino 8.5.3” contributed by Nathan Freeman and Serdar Basegmaz http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&documentId=F92BA8C9A64D1051862579210065A09A

    The other option is in Eclipse (though it should also work in Domino Designer, in e.g. Package Explorer view), you can import the Dojo 1.6 plugin from your Domino Server. You’ll find the Dojo plugin in osgisharedeclipseplugins – com.ibm.xsp.dojo…. (Import, Plugins and Features and choose the folder.) I’ll blog about how to do that in the near future.

  9. to save someone else time in the future,

    FIRST note that you have to have that dojo version installed on the server, manually ( I think, I’m about to tackle that question)

    anyway here’s exactly where you go to actually set the version at the db level:

    go file application properties, then in upper pane click on xpages, then in that new pane, you’ll see a link for xsp.properties and click that go finally get to where you need to work. (I’m sure there’s a more direct way, if so someone please sing out.)

    NOW…

    On general tab, under Dojo section to the right, you manually type in the dojo version you want.

    on persistence tab, untick “use runtime optimized etc”.

    ctrl-s to save.

    1. If you’re upgrading a server, it will have the relevant version of Dojo for each version that’s been installed. If you’re installing a brand new Domino server, it will only have the Dojo libraries for that release. There’s an answer on StackOverflow about how to find the Dojo versions.

      Since 9.0 in Domino Designer, Xsp Properties can be found under the Application Configuration area of application properties – it’s been moved outside just the application properties. I’ve found 9.x Designer more stable, and in Xsp Properties you can specify the minimum supported release to ensure you don’t accidentally use features not available in the relevant Domino server version you’re using.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top