Dojo Toolkit Reference Guide¶
Status: | Draft |
---|---|
Version: | 1.0 |

Dojo¶
Dojo is divided into two parts: Dojo Base, and Dojo Core. Dojo Base is the functionality provided for by just including dojo.js, and Dojo Core is comprised of stable additional (optional) components. Typically, if a function or Class exists within the dojo namespace directly (eg: dojo.require(), dojo.addOnLoad()) it is part of Base Dojo. If the function or Class exists beneath the dojo namespace (eg: dojo.dnd.Mover), you will need to require the appropriate module (eg: dojo.require(“dojo.dnd.Mover”);)
These pages cover both cases, and indicate how they are provided.
Dojo Base¶
Dojo Base is the functionality you get by just including dojo.js or dojo.xd.js in your page.
-
-
Dojo’s Bootstrap
djConfig
Configuring Dojo with djConfig
-
Call functions after the DOM has finished loading and widgets declared in markup have been instantiated
-
Call functions when the page unloads
-
Call functions when window.onunload fires
-
Modifying DOM node attributes
-
Log a debug message to indicate that a behavior has been deprecated
-
Determine if an object supports a given method
-
Get a property from a dot-separated string, such as “A.B.C”
-
Alias for the global scope
-
Multiple inheritance
-
Place DOM nodes relative to others
-
Maps module name to a path
-
Loads a Javascript module from the appropriate URI
-
Set a property from a dot-separated string, such as “A.B.C”
-
The current version number of Dojo
-
Signal fired by impending window destruction
dojo._base.array
Array utilities. Details on dojo.every, dojo.filter, dojo.forEach, dojo.indexOf, dojo.lastIndexOf, dojo.map, and dojo.some.
-
Invokes a callback function for every item in array
-
Applies a callback to each element of arr and returns an Array with the results
-
-
Functions for setting Colors
-
Functions for connecting methods to events and to subscribe and publish events
-
Connects events to methods
-
Disconnects methods from linked topics
-
Linked a listener to a named topic
-
Remove a topic listener
-
Publish an event to all subscribers of a topic
-
Ensure that everytime an event is called, a message is published on the topic.
-
-
Defining Classes
-
Creates a constructor using a compact notation for inheritance and prototype extension
-
-
Managing Callbacks
-
Communication between threads
-
-
DOM Events
-
Dojo animation effects
-
A very useful method for animating CSS properties
-
-
Basic DOM handling functions
-
Select a DOM node by ‘id’
-
A getter/setter for styles on a DOM node
-
Getter for the coordinates (relative to parent and absolute) of a dom node.
-
Getter/setter for the margin-box of node
-
Getter/setter for the content-box of node
-
-
JSON helpers
-
Parses a JSON string to return a JavaScript object
-
Returns a JSON serialization of an object
-
-
Support for Polymorphism
-
Function that generates a wrapper function that ensures a function that will only ever execute in a defined scope.
-
Checks if the parameter is a String
-
Checks if the parameter is an Array
-
Checks if the parameter is a Function
-
Checks if the parameter is an Object
-
Checks if the parameter is like an Array
-
Checks if the parameter is a built-in function
-
-
Syntactic sugar for chaining, common iteration operations, animation, and node manipulation
-
A class to handle a list of DOM nodes
-
-
A relatively full-featured CSS3 query library
-
The swiss army knife of DOM node manipulation in Dojo
-
-
Functions for dealing with the document-wide DOM and context related stuff
-
Alias for the current document
-
Return the body element of the document
-
Changes the behavior of many core Dojo functions that deal with namespace and DOM lookup
-
Call callback with globalObject as dojo.global and globalObject.document as dojo.doc
-
Call callback with documentObject as dojo.doc
-
-
AJAX I/O transports and utility methods
-
Dojo Core¶
dojo.AdapterRegistry
A registry to make contextual calling/searching easier
-
Browser history management resources (Back button functionality)
-
Utility for unobtrusive/progressive event binding, DOM traversal, and manipulation
-
A Common Locale Data Repository (CLDR) implementation
dojo.colors
CSS color manipulation functions
-
Simple HTTP cookie manipulation
-
Localized formatting and parsing routines for currency data
-
A uniform data access layer
-
Date manipulation utilities
-
Event handling for a group of Deferred objects
-
Drag and Drop
-
Effects library on top of Base animations
dojo.gears
Google Gears
-
Inserting contents in HTML nodes
-
Utility classes to enable loading of resources for internationalization
dojo.io
Additional AJAX I/O transports
-
Sends an AJAX I/O call using an IFrame
-
Sends a JSONP request using a script tag
-
dojo.jaxer
-
Adds dojo.fx animation support to dojo.query()
dojo.NodeList-html
Adds a chainable html method to dojo.query()
-
Localized formatting and parsing methods for number data
-
The Dom/Widget parsing package
dojo.regexp
Regular expressions and Builder resources
dojo.robot
experimental module for DOH users
dojo.robotx
experimental module for DOH users
-
Communicate via Remote Procedure Calls (RPC) with Backend Servers
-
Generic JSONP service
-
JSON RPC service
-
RPC service class
-
-
String utilities for Dojo
Dijit¶
Dijit is Dojo’s UI Library, and lives as a separate namespace dijit. Dijit requires Dojo Core. Each of the widgets and functionality provided by Dijit is describe in the following sections, though the aforementioned quickstart guides cover some basics.
- dijit
- dijit.Calendar
- dijit.ColorPalette
- dijit.Dialog
- dijit.Editor
- dijit.InlineEditBox
- dijit.Menu
- dijit.ProgressBar
- dijit.TitlePane
- dijit.Tooltip
- dijit.TooltipDialog
- dijit.Tree
Form handling¶
-
text boxes
-
A specialized input widget for monetary values, much like the currency type in spreadsheet programs
-
An easy-to-use date entry control which allows either typing or choosing a date from any calendar widget
-
A input widget which restricts input to numeric input and offers down and up arrow buttons to “spin” the number up and down
-
A input widget which restricts input to numeric input
-
A simple wrapper of <textarea>; equivalent functionality
-
An auto expanding/contracting <textarea>
-
A basic <input type=”text”>-style form control
-
A time input control which allows either typing or choosing a time from any time-picker widget
-
select type widgets
-
A “auto complete”, which allows the user to type any value and just gives suggested completions
-
The MultiSelect widget allows the selection of multiple items
-
Similar to a <select> but with type-ahead filtering of the drop down list
-
buttons
-
A representation of a normal <button> or <input type=”submit/reset/button” />
-
A button with an arrow to show a drop down (often a menu)
-
A button which displays a menu or some other popup when you press it
-
A cross between a Button and a Checkbox widget
-
other controls
-
Nearly the same as an HTML checkbox, but with fancy styling
-
Corresponds to a <form> itself; wraps other widgets
-
To select one choice from a list
-
A scale with a handle you can drag up/down or left/right to select a value
-
DojoX¶
DojoX serves many purposes, and by design is difficult to document. Here, we have an ongoing effort to document the most used, stable, reliable and powerful aspects of DojoX. DojoX contains code in alpha and experimental states, so your assistance in testing and documenting are especially helpful.
These sections cover the available projects shipped with the Dojo Toolkit
dojox
-
Amazing charting library
-
Additional data stores and data store helpers
-
A clone of dojo.data.ItemFileReadStore, which supports more complex queries than the simple AND format property matching
-
A clone of dojo.data.ItemFileWriteStore, which supports more complex queries than the simple AND format property matching
-
A store designed to provide read-only access to Atom XML documents
-
An abstract data store module for adding updateable result set functionality to an existing data store class
-
An extension of dojox.data.JsonRestStore to handle CouchDB’s idiosyncrasies, special features, and deviations from standard HTTP Rest
-
A read interface based on the dojox.data.CssRuleStore
-
A read interface to the CSS rules loaded in the current page
-
A read interface that works with CSV formated data files
-
A lightweight data store implementation for accessing details about a remote FileSystem
-
Provides access to the Flickr photo sharing site’s REST API
-
A wrapper to the public photo feed of the Flickr service
-
A Google AJAX API powered data store for retrieving RSS and Atom feeds from Google
-
Several data stores to interface Google’s AJAX search services:
dojox.data.GoogleWebSearchStore
A data store for retrieving search results from Google
dojox.data.GoogleBlogSearchStore
A data store for retrieving search results from Google Blogs
dojox.data.GoogleLocalSearchStore
A data store for retrieving search results from Google Location Search
dojox.data.GoogleVideoSearchStore
A data store for retrieving search results from Google Video
dojox.data.GoogleNewsSearchStore
A data store for retrieving search results from Google News
dojox.data.GoogleBookSearchStore
A data store for retrieving search results from Google Book
dojox.data.GoogleImageSearchStore
A data store for retrieving search results from Google Image
-
An enhanced replacement for dojox.data.HtmlTableStore to work with HTML tables, lists, and collections of DIV and SPAN tags.
dojox.data.HtmlTableStore (deprecated)
A read interface to work with HTML tables
-
A local (in memory) store which can attach a dojo.data interface to each javascript object and uses jsonPath as the query language
-
A lightweight data store implementation of a RESTful client
-
An interface for reading property style files (key/value pairs)
-
A read-only store to work with Opml formatted XML files
-
An extension of dojox.data.JsonRestStore to handle Persevere’s special features
-
A data store interface to one of the basic services of the Picasa service, the public photo feed
-
A read-only store, which makes a request to the server for each sorting or query in order to work with big datasets
-
An extension of dojox.data.JsonRestStore to handle Amazon’s S3 service using JSON data
-
ServiceStore and it’s subclasses are a generalized dojo.data implementation for any webservice
dojox.data.SnapLogicStore
A data store interface to use the SnapLogic framework
-
An extension of dojox.data.ServiceStore to use Wikipedia’s search service
-
A read and write interface to basic XML data
-
-
Additional form-related widgets beyond dijit.form functionality
-
A new Button with progresss indicator built in, for indicating processing after you press the button
dojox.form.CheckedMultiSelect
description?
dojox.form.DateTextBox
description?
dojox.form.DropDownSelect
description?
dojox.form.DropDownStack
description?
dojox.form.FileInput (base, Auto, and Blind)
description?
-
A dijit._FormWidget that adds a dojox.widget.FilePicker to a text box as a dropdown
-
A new multi-file uploader that shows progress as the files are uploading
dojox.form.manager (the package)
A collection of mixins to manage complex event-driven dynamic forms
dojox.form.Manager (the widget)
A simple widget based on dojox.form.manager package.
dojox.form.MultiComboBox
description?
dojox.form.PasswordValidator
description?
dojox.form.RadioStack
description?
dojox.form.RangeSliders
description?
dojox.form.Rating
description?
dojox.form.TimeSpinner
description?
-
dojox.gfx3d
dojox.help
-
Additional HTML helper functions
-
A generic content setter, including adding new stylesheets and evaluating scripts (was part of ContentPane loaders, now separated for generic usage)
dojox.html.metrics
Translate CSS values to pixel values, calculate scrollbar sizes and font resizes
dojox.html.styles
Insert, remove and toggle CSS rules as well as search document for style sheets
-
-
Provides a number of image-related widgets
-
Attach images or background images, and let them loop
-
An extension on dojox.image.Badge, using Flickr as a data provider
-
A combination of a SlideShow and ThumbnailPicker
-
A widget which shows a single image (or groups of images) in a Dialog
-
A dojox.gfx-based version of the MagnifierLite widget
-
A simple hover behavior for images, showing a zoomed version of a size image
-
A slideshow of images
-
A dojo.data-powered ThumbnailPicker
-
dojox.jsonPath
dojox.lang
-
Experimental and additional extensions to Dijit Layout Widgets
-
An extension to dijit.layout.ContentPane providing script execution, among other things
-
Provides drag-based scrolling for divs with overflow
-
A self-collapsing widget for use in a BorderContainer
-
An experimental floating window
-
A panel-like layout mechanism, allowing Drag and Drop between regions
-
A variety of StackContainer enhancements providing animated transitions
-
A small widget to provide resizing of a parent node
-
An extended StackContainer suited for presentational purposes
-
An interesting UI, scrolling an overflowed div based on mouse position, either vertical or horizontal
-
A custom Splitter for use in a BorderContainer, providing a lightweight way to collapse the associated child
-
-
Extended classes to communicate via Remote Procedure Calls (RPC) with Backend Servers
- dojox.rpc.SMDLibrary
- dojox.rpc.Client
- dojox.rpc.JsonRest
- dojox.rpc.JsonRPC
- dojox.rpc.LocalStorageRest
- dojox.rpc.OfflineRest
- dojox.rpc.ProxiedPath
- dojox.rpc.Rest
- dojox.rpc.Service
-
-
A circular gauge with a variety of indicators, used to display numerical data
-
A horizontal bar gauge with a few indicators, used to display numerical data
-
An extended dijit._Calendar
dojox.widget.CalendarFx
An extended dijit._Calendar with FX
-
A HSV Color Picker, similar to PhotoShop
-
An extension to dijit.Dialog which provides additional sizing options, animations, and styling
dojox.widget.DocTester
A widget to run DocTests inside an HTML page
-
A specialized version of RollingList that handles file informatione
-
A OSX-style Fisheye Menu
-
A more robust Fisheye Widget, which fish-eyes’ any CSS property
dojox.widget.Iterator
A basic array and data store iterator class
-
A small experimental Ajax Activity indicator (deprecated, will be moved to dojo-c)
-
A dojo.data powered Pager Widget, displaying a few items in a horizontal or vertical UI
dojox.widget.PlaceholderMenuItem
A menu item that can be used as a placeholder.
-
An unobtrusive “roller”, displaying one message from a list in a loop
-
A rolling list that can be tied to a data store with children
dojox.widget.SortList
A small sortable unordered-list
-
A small widget that can be used to mark sections of a page as busy, processing, unavailable, etc.
-
A message display system, showing warnings, errors and other messages unobtrusively
dojox.widget.Wizard
A simple widget providing a step-by-step wizard like UI
-
DojoC¶
DojoC is an svn repository used by DojoCampus for a variety of widgets, tutorials, sandbox, and other demos. You are welcome to explore and contribute, though absolutely nothing is guaranteed to work. DojoC is meant as a community workshop, and code comes and goes frequently, often times ‘promoted’ to DojoX projects.