Ticket #7520 (new enhancement)
ContentPane - loadModules option
| Reported by: | Les | Owned by: | peller |
|---|---|---|---|
| Priority: | normal | Milestone: | future |
| Component: | Dojox | Version: | 1.1.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I was wondering why there's no option for the ContentPane? to load modules referenced in the content. I think this would be a rather simple addition, see the (untested) code fragment below:
_createSubWidgets: function(){
// summary: scan my contents and create subwidgets if(this.loadModules) {
dojo.query('[dojoType]', this.domNode).forEach(function(node) {
var resource = dojo.attr(node, 'dojoType'); dojo.require(resource);
});
} try{
dojo.parser.parse(this.containerNode, true);
}catch(e){
this._onError('Content', e, "Couldn't create widgets in "+this.id
+(this.href ? " from "+this.href : ""));
}
}
Also, see this discussion: http://dojotoolkit.org/forum/dijit-dijit-0-9/dijit-development-discussion/contentpane-load-modules-option