- The Book of Dojo
- Quick Installation
- Hello World
- Debugging Tutorial
- Introduction
- Part 1: Life With Dojo
- Part 2: Dijit
- Part 3: JavaScript With Dojo and Dijit
- Part 4: Testing, Tuning and Debugging
- Part 5: DojoX
- The Dojo Book, 0.4
Creating and Scripting Widgets
Submitted by OpenBip on Tue, 06/05/2007 - 17:56.
Part 2: Dijit discussed how to work with widgets declaratively, using the "dojoType" attribute in HTML tags. This section explains how to create and interact with dojo widgets programmatically, via JavaScript.
This discussion spans the following topics:
- Creating a Widget Programmatically
- How to create dojo widgets from JavaScript, and swap/insert them into a page's DOM existing structure
- Interacting With Widgets
- How to change properties/behavior of a dojo widget throughout the lifecycle of a page
- Writing Your Own Widget
- How to write and instantiate your own widgets
- Printer-friendly version
- Login or register to post comments
- Subscribe post
Examples Needed
We need examples that show us how to use the data-enabled controls programatically. We also need info on the properties and methods we can use for each control.
These are elsewhere...
The properties and methods for each control are in Part 2. And though all of the examples are declarative, they can all be converted to programmatic examples with a simple code change.
Mis-organization.
There is no reason for a reader to think that "creating a widget programatically" should be inside "Manipulating widgets". Creating a new widget is not manipulating a widget. I had a hard time finding the "create a widget" page because it was hidden under a seemingly unrelated title.
Makes Sense
... so I changed the title.
This comment and reply will be removed after 12/31/07 to avoid confusion.