Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2150 mathias 1
Changes from Dojo 0.4 dojo.widgets to new dijit project
2
=======================================================
3
 
4
The widgets and widget infrastructure have been separated into separate project,
5
vastly streamlined and with a new directory structure.   There are many other changes.
6
 
7
Markup
8
------
9
 
10
dojoType="button" replaced by dojoType="dijit.Button"  Must use fully qualified class name,
11
and it's case-sensitive.
12
 
13
Need to manually dojo.require("dojo.parser") to get parsing
14
 
15
Widget namespaces and widget auto-loading are desupported.
16
 
17
onClick="foo" now overrides (ie, replaces) the default onClick() function rather than attaching to it,
18
so widget designers should make empty onClick() functions (when appropriate).
19
 
20
Programmatic creation
21
---------------------
22
Create widgets via
23
 
24
	new dijit.Button(params, srcNodeRef)
25
 
26
createWidget() call removed since multiple renderers are no longer supported (see next section).
27
 
28
At least for the dijit widgets, all widgets are guaranteed to work programmatically, which in
29
effect means that all widgets must have templates, unless the default <div> works.
30
 
31
Renderers
32
---------
33
Removed support for multiple renderers (svg & vml & a11y) for a single widget.
34
If a widget wants to render differently on different platforms, there must be
35
branching code inside the widget, or it needs to call a library that branches
36
based on the browser type (like dojo.gfx or dojo.charting).
37
 
38
 
39
Templates
40
---------
41
"this." is no longer used within ${} substitution notation.  See ticket #2905.
42
dojoRoot,buildScriptBase,dojoModuleUrl are no longer supported, but
43
any JavaScript properties on the widget's 'this' may be referenced with dotted notation.
44
The attributes dojoOn* are desupported (including dojoOnBuild);
45
also can't use id attribute to affect a dojoAttachPoint.
46
 
47
dojoAttachEvent is case sensitive, so capitalization matters.   You will probably have
48
to change
49
 
50
dojoAttachEvent="onClick"
51
 
52
to
53
 
54
dojoAttachEvent="onclick: onClick"
55
 
56
(given that the event name is lowercase, and assuming that the method name is camel case)
57
 
58
lists within dojoAttachPoint, dojoAttachEvent, waiRole, and waiState are now comma-separated
59
(not separated by semi-colons)
60
 
61
Standard HTML attributes like 'id', 'name', 'lang', etc. are carried over programmatically
62
by the _Widget constructor and do not need to be declared in the template (see _Widget.attributeMap)
63
 
64
Parent/Child relationships
65
--------------------------
66
By default widgets exist as islands, not knowing about their parent widget or children widgets.
67
The exception is the destroy() function which will also delete all descendant widgets.
68
Some widgets like Tree and SplitContainer will know about their children, but those widgets
69
will use the special mixins in Container.js / Layout.js.
70
 
71
Widget.js base class
72
--------------------
73
 
74
 - Widget.js, Domwidget.js, HtmlWidget.js combined into dijit.base.Widget, with TemplatedWidget mixin
75
for widgets with templates
76
 
77
 - on widget creation, postMixInProperties(), buildRendering() and postCreate() is called.
78
 fillInTemplate() is no longer called.  In addition, those functions call signatures have changed.
79
 No arguments are passed.  To get the source dom Node, just reference this.srcDomNode.
80
When postCreate() is called the widget children don't yet exist.
81
 
82
 - The TemplatedWidget mixin defines buildRendering().  widgetsInTemplate not ported yet.
83
 
84
 - onResized() removed
85
 
86
 - the whole parent/child relationship thing is gone
87
 
88
 - extraArgs[] is gone
89
 
90
 - postCreate() called but child widgets don't exist yet
91
 
92
 - templateCssPath ignored.   User must manually include tundra.css file
93