Adding Dojo 1.6+ in Lotus Notes database v8.5.3 - dojo

Lotus Notes 8.5.3 uses dojo 1.5.1. However I want to use dojo 1.6/1.7 library in my NSF database. How can I do it? I tried to use the technique suggested by Keith Strickland in his blog but no luck.
I need to include the dojo library in NSF database and not on server.
The reason I want to do this so as to use the advanced Dojo Mobile libraries (from dojo 1.6/1.7) in my XPages.
UPDATE: I even posted this question on XPages forum some time back but no replies.

The Domino 8.5.3 server uses Dojo 1.6.1 for XPages. You should see this if you view the HTML source of a test application.
As an example, I see this in one of my applications:
"/xsp/.ibmxspres/dojoroot-1.6.1/dojo/dojo.js"
If you are going to create apps using Dojo Mobile then take a look at the Extension Library and the latest Upgrade Pack 1 for Domino 8.5.3. Both includes XPages Mobile controls.

Per's correct that the Dojo plugin that is loaded by default is 1.6.1 (the ".1" is because it includes IBM-specific code and this means it differentiates it from anything a developer has added in).
The files in the js folder on the server / client are 1.5.1 and this is needed for iNotes.
You can change the Dojo version in the xsp.properties by setting xsp.client.script.dojo.version in Package Explorer. Incidentally UP1 offers a nice visual editor for the xsp.properties file.
However, currently if you change this setting you need to uncheck "Use runtime optimized javaScript and CSS resources" or it will still use the plugin. I noticed this too late for anything to be done before the Gold release.
If you add 1.7 files to the server and include the IBM folder from 1.5.1 it may work. AFAIK there's no way to get the IBM folder from the plugin code.
See my blog post for more details: http://www.intec.co.uk/domino-8-5-3-greater-power-over-dojo-thanks-ibm-for-your-work/

Related

Migrate from dojo to standard bootstrap admin dashboard theme

I am using a php dojo v1.4 project with mysql as backend.
The UI looks very basic.
I need to migrate this project to a standard bootstrap admin theme.
What are the steps I need to do?
If backend and general architecture of your application will remain the same, I'd suggest you to start building new UI from the scratch. When it finished, write missing functions, which were previously implemented with dojo using jquery (which comes with bootstrap) or whatever you like.
I assume, that you are not going to use dojo anymore.
If you are facing some specific difficulties, you'd better provide more details in your question.

Overriding Dojo version for a particular Xpages database

Apple's iOS 8 breaks certain tap functionality in versions of dojo prior to 1.9.4 (see Xpages mobile controls not working in iOS8
The current version of Dojo in Domino 9.0.1 FP2 is 1.9.2 but that does not fix the issue. You have to use at least 1.9.4.
I have downloaded 1.9.4 and placed it in the correct folder on our test server. But I cannot get things to work. I changed the folder name of dojo 1.9.4 to 1.4.0 as I only want to use this version for 2 dbs that are having the problem.
Question 1:
What line do I put in the xsp.properties file:
xsp.client.script.dojo.version = 1.4.0
xsp.client.script.dojo.path = / domjs / dojo-1.4.0
Question 2:
There are so many things to download when I go to the dojo download page. I downloaded the zip file and used that.
When I run code to test what version of dojo I have I get 1.9.4. But when I try to load my page, I get an error.
dojo._loaders: TypeError: dojo._loaders is undefined
Any help would be GREATLY appreciated.
You probably have the right dojo zip, this one: http://download.dojotoolkit.org/release-1.9.4/dojo-release-1.9.4.zip. As you say, unzip that to the dojo-1.9.4 folder in <server-install>\data\domino\js\, or name the folder 1.4.0 if you want to specify it for only a few apps.
You will indeed need to copy the IBM folder from the <server-install>\osgi\shared\eclipse\plugins\com.ibm.xsp.dojo_9.0.1.<date-stamp>\xsp.dojo.jar into your new 1.9.4 (or 1.4.0) dojo folder. Little chance of anything working without it. Copying the ibm folder from the 1.5.2 folder is a bad idea as that is old code, and you'd certainly have issues with it working with dojo 1.9.4. In Fix Pack 2, the ibm folder from the plugin was tested/designed to work with dojo 1.9.2 (the version in that jar), so it should play fairly nice with 1.9.4.
In your XPages app, in the xsp.properties, you should only need the line:
xsp.client.script.dojo.version = 1.9.4
Rebuild your app, restart the server etc, and you should be good to go.
DISCLAIMER: This is a work-around, not a supported solution by IBM. There may be unexpected issues using this approach. It's used at your own risk.
You commented already on that topic here so I think you tried this one? http://hasselba.ch/blog/?p=323
This is the SO thread: XPages mobile controls not working with iOS 8

IBM Worklight 6.0 - Controlling Dojo Layers

The question concerns how to use the Dojo tooling in Worklight Studio 6.
I am using Worklight Studio 6.0.0.20130926-1933 as a a plugin for my Juno Eclipse on a macbook.
I want to use Dojo, and to use a few more Dojo components than are delivered in the standard layers. So, when creating my project I selected the option to add Dojo Toolkit and took the New Dojo Library option, in the dialogue that appears I stayed with the "provided" dojo, and expanded the "select Dojo components to be included" section - this shows all the optional Dojo modules, including ones I want to use (for example dojox/form/Manager).
Having finished that selection I see some layer files have been created in my new DojoProject and they are copied to the www directory of my Worklight project, however so far as I can see the extra Dojo modules are not present in the layers - a search for dojox/form finds nothing, and my app's attempt to require "dojox/form/Manager" fails.
I can work round this by manually building layers and loading them, but I assume that I'm not using the tool correctly.
What is the correct way to use the Worklight tools to control the layer contents?
Transpires that the selected Dojo components are available for use but do not get included in any layers. The dojo components are available for serving via the Dojo Libarary Requests capability.
Seems that at present if we need to get those extra files into layers then we are required to use the Dojo layer building scripts by hand and copy the results in the Worklight project's wwww directory.

where can I get a XD version dojo source

WHere can I get a XD version of dojo source like the one hosted on google? What I want to do is to host dojo source from my local CDN, and my custom dojo module in my web application. Is this a good practice? or I might as well just include the dojo source in my web app, and run the custom build?
Thanks,
You can build an xd version of dojo from the source code
Here are instructions on how to do it:
http://dojotoolkit.org/reference-guide/1.7/quickstart/custom-builds.html
See the section on "doing xdomain builds"
In our organization (a large one), we do have a CDN version of dojo deployed on internal CDN mainly since some of our webapps are not allowed to access extranet (firewall issues).
For performance, though, a custom build gives biggest boost since it is customized to the modules you need/use - once the custom build is done, you only need to ship a single compressed js output file and a small number of supporting files
When doing your custom build, you can use the xdDojoPath and loader=xdomain if you wish to use cross domain dojo to load your optimized js - see http://osdir.com/ml/cometd-users/2011-08/msg00050.html for some notes on this
Also see related SO question: Dojo on a CDN vs own install
The good news is that with Dojo 1.7+ and the new loader, you don't have to do anything special for a cross domain build (good answer above from #Vijay Agrawal, but I think that reference guide link may need some updating for 1.7) Just write your code to the new AMD format, use asynch:true, run the build tools to create layers, and deploy them on any server. AMD makes use of callbacks and many of the tricks the old Dojo xd builder used to employ, but in a much simpler way.
To support older code, there is a legacy cross domain mode mentioned in the loader docs.

Installing Dojo into Aptana

How would I install support for dojo into Aptana?
Basically I want to have auto completion working for dojo. Is there a way to do it?
The process has changed. Instead, you drop a library API file into your project:
http://wiki.appcelerator.org/display/tis/Using+JavaScript+Libraries
You do drop a library API file in your project as described in the link Ingo Muschenetz provided. However, no plugin that I have found currently FULLY supports Dojo content assist or auto completion. As in dojo.byId or dijit.byId are not supported through Aptana.
Here is the updated link to install Dojo support for Aptana:
http://docs.appcelerator.com/titanium/latest/#!/guide/JavaScript_Library_Support
Just follow the instructions under Dojo.