Reputation: 2807
I am working on a mobile application using XPages. I am trying to speed things up by caching ressources locally on the device. That is not a simple task using the controls in the Extension Library (e.g. I have typeahead on some of the pages).
Therefore, I have decided to build a parallel interface using jQuery Mobile to be able to benchmark the two approaches.
In doing this I would like to handle the ressource for the jQuery Mobile XPage so that I only load the ressources needed, i.e. avoid loading dojo (there is a short guide e.g. on this page: http://dpastov.blogspot.dk/2011/01/trying-to-get-full-control-over-xpage.html). The problem with the solutions I have found is that they are application wide. E.g. setting
xsp.client.script.libraries=none
in xsp.properties will take effect for all of the XPages in the database (including the Ext.lib version of the app.). Following the guide in the "XPages Portable Command Guide", I have tried to set the property for the individual XPage (the jQuery Mobile one) as:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" disableTheme="true" createForm="false">
<xp:this.properties>
<xp:parameter name="xsp.client.script.libraries" value="none">
</xp:parameter>
</xp:this.properties>
Unfortunately, this does not seem to work.
I know, that I could put the second XPage in a separate database, however, I would like to avoid that since that raises other issues.
Any ideas?
/John
Upvotes: 2
Views: 680
Reputation: 10485
You can disable the dojo libraries by adding
facesContext.getRequestParameters().setJsLibrary(0);
to beforeRenderResponse or beforePageLoad event of your XPage.
Upvotes: 4
Reputation: 20384
using a secondary database for your jQuery design sounds reasonable. What you should do then is load the UI from the secondary database and use ajax calls to (a) ajax/rest control(s) in the primary database. You could also load your UI from resources or classic pages (set to passthru HTML).
Clarification of options (each bullet is a separate approach):
Hope that helps
Upvotes: 0