Use the General Interface class jsx3.util.Dojo to load the Dojo Toolkit in your General Interface application. jsx3.require("jsx3.util.Dojo");
jsx3.util.Dojo.load();
Dojo widget integration with jsx3.gui.DojoWidget requires that the Dojo Toolkit be loaded. jsx3.gui.DojoWidget calls Dojo.load(), so you usually do not need to call this method explicitly. However, you may want to load the Dojo Toolkit even if you are not using Dojo widgets, as in the following example. jsx3.require("jsx3.util.Dojo");
jsx3.util.Dojo.load();
dojo.query("p").fadeOut();
Installing the Dojo ToolkitSome binary distributions of General Interface include a pre-built version of Dojo. General Interface assumes that Dojo will be installed in the standard directory dojo_toolkit/ contained in the General Interface installation directory, although this location can be overridden. The contents of this directory would typically be dojo/, dojox/ and dijit/. Dojo can be added to any General Interface build. Dojo itself is available in many pre-built varieties and as a source distribution. To add Dojo to General Interface,
You can also replace the Dojo build included in a General Interface distribution with a custom Dojo build using the same steps.
After these steps are completed, the General Interface classes jsx3.util.Dojo and jsx3.gui.DojoWidget will function properly.
Deploying and Loading DojoIf your General Interface application uses Dojo, for example by including an instance of jsx3.gui.DojoWidget in a component file, you must deploy the Dojo directory along with the rest of the General Interface deployment files. Copy dojo_toolkit/ to the deployment location. It should be in the same directory as JSX/. You may override the default location (dojo_toolkit/) where General Interface looks for Dojo. To do this set the jsx_dojo deployment parameter to the relative path from the application launch page to the Dojo directory. For example: <script type="text/javascript" src="JSX/js/JSX30.js" jsxapppath="JSXAPPS/myApp" jsx_dojo="../path/to/dojo"> </script> Alternatively, you can load the Dojo toolkit by adding a script tag in the HTML head of the application launch page. The src attribute of the script tag should be the location of dojo.js. <head> <script type="text/javascript" src="dojo-toolkit/dojo/dojo.js"></script> </head> |
Contents
|
