1 | define([ |
---|
2 | "dijit/_Widget", |
---|
3 | "dijit/_TemplatedMixin", |
---|
4 | "./manager/_Mixin", |
---|
5 | "./manager/_NodeMixin", |
---|
6 | "./manager/_FormMixin", |
---|
7 | "./manager/_ValueMixin", |
---|
8 | "./manager/_EnableMixin", |
---|
9 | "./manager/_DisplayMixin", |
---|
10 | "./manager/_ClassMixin", |
---|
11 | "dojo/_base/declare" |
---|
12 | ], function(_Widget, _TemplatedMixin, _Mixin, _NodeMixin, _FormMixin, _ValueMixin, _EnableMixin, _DisplayMixin, _ClassMixin, declare){ |
---|
13 | |
---|
14 | /*===== |
---|
15 | _Widget = dijit._Widget; |
---|
16 | _Mixin = dojox.form.manager._Mixin; |
---|
17 | _NodeMixin = dojox.form.manager._NodeMixin; |
---|
18 | _FormMixin = dojox.form.manager._FormMixin; |
---|
19 | _ValueMixin = dojox.form.manager._ValueMixin; |
---|
20 | _EnableMixin = dojox.form.manager._EnableMixin; |
---|
21 | _DisplayMixin = dojox.form.manager._DisplayMixin; |
---|
22 | _ClassMixin = dojox.form.manager._ClassMixin; |
---|
23 | =====*/ |
---|
24 | return declare("dojox.form.Manager", [ _Widget, _Mixin, _NodeMixin, _FormMixin, _ValueMixin, _EnableMixin, _DisplayMixin, _ClassMixin ], { |
---|
25 | // summary: |
---|
26 | // The widget to orchestrate dynamic forms. |
---|
27 | // description: |
---|
28 | // This widget hosts dojox.form.manager mixins. |
---|
29 | // See _Mixin for more info. |
---|
30 | |
---|
31 | buildRendering: function(){ |
---|
32 | var node = (this.domNode = this.srcNodeRef); |
---|
33 | if(!this.containerNode){ |
---|
34 | // all widgets with descendants must set containerNode |
---|
35 | this.containerNode = node; |
---|
36 | } |
---|
37 | this.inherited(arguments); |
---|
38 | this._attachPoints = []; |
---|
39 | this._attachEvents = []; |
---|
40 | _TemplatedMixin.prototype._attachTemplateNodes.call(this, node, function(n, p){ return n.getAttribute(p); }); |
---|
41 | }, |
---|
42 | |
---|
43 | destroyRendering: function(preserveDom){ |
---|
44 | // ctm: calling _TemplatedMixin |
---|
45 | if(!this.__ctm){ |
---|
46 | // avoid recursive call from _TemplatedMixin |
---|
47 | this.__ctm = true; |
---|
48 | _TemplatedMixin.prototype.destroyRendering.apply(this, arguments); |
---|
49 | delete this.__ctm; |
---|
50 | this.inherited(arguments); |
---|
51 | } |
---|
52 | } |
---|
53 | }); |
---|
54 | }); |
---|