Configuring Dojo project libraries

You can configure which libraries you want your Dojo project to use.

Procedure

  1. In the Enterprise Explorer view, right-click your web project and select Properties to display the properties window.
  2. Select Dojo Toolkit.
  3. To use a different Dojo toolkit:
    1. Click Change how this project accesses Dojo.
    2. Choose one of the following options to set up Dojo in your web project and click Next:
      Copy Dojo into this project. It will be deployed from there.
      Specify the name of the Dojo folder and which of the following Dojo Toolkits to use:
      • One that is provided with the product
      • One that is in your workspace or file system
      You can select an archive file of a compressed Dojo distribution. When you click Finish, the contents of the archive file are automatically extracted into your project.
      Dojo is in a project in the workspace, and will be deployed from there.
      Browse to the root Dojo folder in another project in your workspace. The Dojo Toolkit is not copied into your project. It is deployed from the project that contains the toolkit.
      Dojo is remotely deployed or is on a public CDN.
      Specify the remote location of the Dojo toolkit source:
      • Public CDN: Enter the URL of a publicly available content delivery network. Content delivery networks provide geographically distributed hosting for open source JavaScript libraries. When a browser resolves the URL in your web application, the browser automatically downloads the file from the closest available server.
      • Remote URI: Type the URI of the remote location to the root Dojo folder.

      In the Corresponding Dojo section, choose the Dojo source distribution that is the closest match to your remote Dojo Toolkit. This selection provides access to tools such as content assist. You can choose the default Dojo provided with this product or browse to a Dojo folder in your workspace or file system.

    3. If you copied the Dojo Toolkit into your project, you can include only the parts of the Dojo Toolkit that are required for your web application. Expand the Select the Dojo components to be included in the project section and select the Dojo components that you want to include in your project.
      Tip: To select one of the most commonly selected configurations, choose an item from the Common Configurations list:
      • Minimal includes dojo/dojo.js, dojo/_base.js, and dojo/_base.
      • Dojo Core includes dojo.
      • Dijit includes dijit and dojo.
      • Dojox Mobile includes dijit, dojo, dojox/fx, dojox/mobile dojox/fx.js, and dojox/mobile.js.
      To include Dojo support in your web project, select dojo/dojo.js, dojo/_base.js, and dojo/_base (the minimal configuration).
      Note: The test code included in Dojo Toolkit SDK 1.6 and previous versions is vulnerable to cross-site scripting attacks. These vulnerabilities are contained in several .php files that supply dummy data for the test cases. When you select these files to copy into the project, a warning message is displayed in the Dojo Project Setup page of the wizard. Clear the selections for these files so that they are not copied into the project. If you require these files, ensure that they are not deployed with your web application.
  4. Click Finish.
  5. Modify the paths to the Dojo root, loader, or CSS files and click OK.

Results

When you create a new web page and add Dojo widgets to the page, the required include statements that are generated into the <head> tag of the page by using the path that is specified in the project properties.
Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: tdojoconfiglib.html