Using XPages? – want to disable Dojo?

This is a small very technical tip. It has been documented elsewhere. However, today I came across someone who did not know and, therefore, I decided to write it here.

If you are developing XPages using IBM Domino Designer from time to time you may want to stop the loading of the “fat” Dojo libraries. You may have decided to use jQuery Mobile for your mobile solution (as I do for a mobile app). On the other hand you may not want to disable Dojo for the entire application (in the xsp.properties file). So what do you do?

You can add the following SSJS code to the beforePageLoad event of your XPage:

facesContext.getRequestParameters().setJsLibrary(0);

… and you are done!

2 Responses to Using XPages? – want to disable Dojo?

  1. Has this any negative influences on the whole event handling for XPages itself or will all the standard stuff (event binding, partial refreshing etc.) still work?

    • Hi Oliver

      First, apologies for not having seen your post before (it needed an approval).

      Well, if you disable Dojo – then off course you will not be able to use anything that uses Dojo. So it really depends on what you want to do. I have only used it in situations where I wanted to handle everything in the UI myself. So I believe you should test for your own scenario.

      /John