|
111 |
|
111 |
|
112 |
_initializingElements: 0, |
112 |
_initializingElements: 0, |
113 |
|
113 |
|
|
|
114 |
_initializedDeferred: null, |
115 |
|
114 |
postMixInProperties: function() { |
116 |
postMixInProperties: function() { |
115 |
this.inherited(arguments); |
117 |
this.inherited(arguments); |
116 |
|
118 |
|
|
169 |
buildRendering: function() { |
171 |
buildRendering: function() { |
170 |
this.inherited(arguments); |
172 |
this.inherited(arguments); |
171 |
|
173 |
|
|
|
174 |
this._initializedDeferred = new dojo.Deferred(); |
175 |
|
172 |
if (this.scrollable) { |
176 |
if (this.scrollable) { |
173 |
dojo.style(this.containerNode, { |
177 |
dojo.style(this.containerNode, { |
174 |
overflow: 'auto' |
178 |
overflow: 'auto' |
|
210 |
} |
214 |
} |
211 |
} |
215 |
} |
212 |
|
216 |
|
|
|
217 |
|
213 |
// send an event when all dynamic elements have been initialized |
218 |
// send an event when all dynamic elements have been initialized |
214 |
this._initializingElements = 0; |
219 |
this._initializingElements = 0; |
215 |
umc.tools.forIn(this._widgets, function(iname, iwidget) { |
220 |
umc.tools.forIn(this._widgets, function(iname, iwidget) { |
|
228 |
|
233 |
|
229 |
// send event when the last element has been initialized |
234 |
// send event when the last element has been initialized |
230 |
if (0 === this._initializingElements) { |
235 |
if (0 === this._initializingElements) { |
231 |
this.onValuesInitialized(); |
236 |
this._initializedDeferred.resolve(); |
232 |
} |
237 |
} |
233 |
})); |
238 |
})); |
234 |
} |
239 |
} |
|
236 |
|
241 |
|
237 |
// maybe all elements are already initialized |
242 |
// maybe all elements are already initialized |
238 |
if (!this._initializingElements) { |
243 |
if (!this._initializingElements) { |
239 |
this.onValuesInitialized(); |
244 |
this._initializedDeferred.resolve(); |
240 |
} |
245 |
} |
|
|
246 |
|
241 |
}, |
247 |
}, |
242 |
|
248 |
|
|
|
249 |
startup: function() { |
250 |
this.inherited(arguments); |
251 |
this._initializedDeferred.then(dojo.hitch(this, function(result) { |
252 |
this.onValuesInitialized(); |
253 |
})); |
254 |
}, |
255 |
|
243 |
postCreate: function() { |
256 |
postCreate: function() { |
244 |
this.inherited(arguments); |
257 |
this.inherited(arguments); |
245 |
|
258 |
|