#14666 closed enhancement (fixed)
Allow extension of dojox/app/view with templateString defined
Reported by: | nickmaynard | Owned by: | Eric Wang |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8 |
Component: | DojoX App | Version: | 1.7.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Fairly simple, this just needs conditional, rather than default, mixing-in of templateString when instantiating the child view in scene.js. This allows a dojox/app/view with custom templateString.
Patch, paths will require trimming to apply it:
### Jazz Patch 1.0 #date: "2012-01-24 00:15:32.000000034 +0000" #itemid: "BankDataDojoWeb/WebContent?/dojo/dojox/app" "_ynz4QEXPEeG0YuuH60K5Wg" "_ptq_4EM_EeGZHp7HYk4s2g" #item_type: "_ynz4QEXPEeG0YuuH60K5Wg" "folder" #itemid: "BankDataDojoWeb/WebContent?/dojo/dojox/app/scene.js.uncompressed.js" "_yoB6sEXPEeG0YuuH60K5Wg" "_ptq_4EM_EeGZHp7HYk4s2g" #item_type: "_yoB6sEXPEeG0YuuH60K5Wg" "file" #before_state: "BankDataDojoWeb/WebContent?/dojo/dojox/app/scene.js.uncompressed.js" "_yoB6sEXPEeG0YuuH60K5Wg" "_9IPlqUXZEeG-5NjYUuFGQw" # diff -u -N BankDataDojoWeb/WebContent?/dojo/dojox/app/scene.js.uncompressed.js BankDataDojoWeb/WebContent?/dojo/dojox/app/scene.js.uncompressed.js --- BankDataDojoWeb/WebContent?/dojo/dojox/app/scene.js.uncompressed.js 2012-01-05 09:31:00.000000550 +0000 +++ BankDataDojoWeb/WebContent?/dojo/dojox/app/scene.js.uncompressed.js 1970-01-01 01:00:00.000000256 +0100 @@ -144,12 +144,15 @@
throw Error("Unable to find appropriate ctor for the base child class");
}
- var params = dojo.mixin({}, conf, {
+ var mixinParams = {
id: self.id + "_" + childId,
parent: self, app: self.app
- })
+ }; + Conditionally add a templateString parameter - dojox/app/view has a default anyway so we don't need to enforce one + if (conf.template) mixinParams.templateString = arguments[0][arguments[0].length-1]; + + var params = dojo.mixin({}, conf, mixinParams);
if (subIds){
params.defaultView=subIds;
}
Attachments (1)
Change History (6)
Changed 9 years ago by
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
in dojox.app 1.8, you can use new dojox.app.view to create view with template string
this.view = new View({ id: this.id, name: this.name, parent: this, templateString: this.templateString, definition: this.definition });
comment:3 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|
Ideally this would work for other levels such as dojox.app.schema. This may already be the case - I haven't tested that level.. yet.