#10526 closed defect (fixed)
dojox.dtl._Templated widget throws 'this._attachPoints has no properties' error
Reported by: | James Cantwell | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.4.1 |
Component: | DojoX DTL | Version: | 1.4.0b |
Keywords: | dtl | Cc: | |
Blocked By: | Blocking: |
Description
This is the first dojo ticket I've created so apologies if I've missed out on adding any necessary information. I have a widget that extends dojox.dtl._Templated where the template contains some widgets with a dojoattachPoint attribute specified. This was working in 1.3.2 as far as I remember but it now throws an error 'this._attachPoints has no properties' in 1.4rc2. Below is a stripped down test case that produces the error
dojo.provide("views.users.UserEdit"); dojo.require("dijit._Widget"); dojo.require("dojox.dtl._Templated"); dojo.require("dijit.form.Form"); dojo.declare("views.users.UserEdit", [ dijit._Widget, dojox.dtl._Templated ], { templateString: dojo.cache("views.templates.users","userEditorPage.html"), widgetsInTemplate: true, userEditorTitle: "Edit User", constructor: function(args) { console.log("views.user.UserEdit constructor."); dojo.mixin(this, args); } });
template
<div> <div class="top-level-header">{{userEditorTitle}}</div> <div dojoType="dijit.form.Form" dojoAttachPoint="userEditorForm"> </div> </div>
Attachments (2)
Change History (9)
comment:1 Changed 11 years ago by
Component: | General → DojoX DTL |
---|---|
Owner: | changed from anonymous to Neil Roberts |
Changed 11 years ago by
Attachment: | _Templated.patch added |
---|
comment:2 Changed 11 years ago by
I tried #10014 patch but I won't fix this issue. However this small patch did the trick.
comment:3 Changed 11 years ago by
IMO this is not the dojox.dtl._Templated issue. The problem is related to dijit._Templated. The protected property _attachPoints isn't declared in the dijit._Templated class. The first occurrence is in line 78 of buildRendering method and of course this method is inherited in dojox.dtl._Templated what causes the problem.
comment:4 Changed 11 years ago by
Milestone: | tbd → 1.4.1 |
---|---|
Owner: | changed from Neil Roberts to bill |
Status: | new → assigned |
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:6 Changed 11 years ago by
Strangely, the DTL automated tests mostly pass both before and after this change. Guess we need some more tests.
Anyway tell me if it's working (or not working) for you. (I just checked in the dijit._Templated.patch that ID attached.)
comment:7 Changed 11 years ago by
ID, thanks for the patch!
Bill, I've encountered an "this._attachPoints is undefined" error while I was examining a demo_FlickrRestStore.html and demo_FlickrStore.html demos for my MyTravelog project. Both of the samples throws an "this._attachPoints is undefined" exception while trying to load /dojox/dtl/tag/logic.js. After I applied a ID's patch to a local dojo copy, it started to work perfectly.
BTW: thanks all of you Dojo's do'ers for the 1.4 release! :)
Probably a dup of #10014, not sure.