Tutorials

Read more

Extending dojo.dnd with a creator function

Following the Dojo philosophy of "build with, not on", dojo.dnd provides a terrific API for getting the right behaviour for your app, with plenty of extension points and monkeypatching opportunities. Making a creator function for dojo.dnd.Container is the most obvious way to customize dojo.dnd, because it gets called anytime a container or avatar wants to visualize a data item.

Read the rest of this entry »

Read more

Separating Content from Presentation the Dojo Way

Separating Content from Presentation the Dojo Way

One of the cool things about Dojo is the dojo.xhrGet() function. It's powerful because it makes transparent the browser dependent transports that make AJAX possible. In this cookie, we're going to explore a simple use case in Dojo to separate content from the presentation of a page. This means that if you want to update some content of a specific portion of a page, you may not want to require the user to 'refresh' the entire page to see the new content. Read the rest of this entry »


Read more

dijit.Tree - server fetch on node expansion

dijit.Tree - server fetch on node expansion

Here's an example of a Tree that pulls data from the server on child node expansion (clicking the "+" next to a node that has children) - dojo 1.1 or better required:
Read the rest of this entry »


Read more

Dojo and Air, a fancy file uploader

Dojo and Air, a fancy file uploader

How many times have you had trouble uploading files to your favorite CMS? How many times did a client say "I am not happy with uploading one file at a time"? And last but not least, how many times did you implement a third party plugin/software/piece of magic to implement efficient file uploading?
Read the rest of this entry »


Read more

Extending a widget to make it data-aware

Extending a widget to make it data-aware

In the cookie about dojo.data, I extolled the virtues of data-driven widgets, and how much I loved them. However, there are times when the widget you want to use is not data-aware. This tutorial will step you through how to quickly and easily add data capability to a widget.

Read the rest of this entry »