Creating Dojo classes

You can add custom Dojo classes to use in Dojo widgets.

Procedure

  1. In the Enterprise Explorer view, right-click the WebContent folder in your web project and select New > Dojo Class..
  2. In the Dojo Class field, enter the name of your Dojo class.
  3. In the Module Name field, specify a module name.
  4. In the Source Folder field, specify a folder for the class.
  5. In the Supertypes field, specify any supertypes for the Dojo class.
  6. Click Customize Dojo Class template to control the informational comments that are added to the class source. The Templates preferences dialog opens. Clear the check boxes of the comments that you do not want displayed in your class source. Click OK.
  7. Click Finish. A JavaScript file is created with dojo.provide and dojo.declare statements. Content assist is available.

What to do next

Now you can add functions to your Dojo class, for example, constructors. The class can be instantiated in other HTML or JavaScript files in your web project.
Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: tcrtdojoclass.html