Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14841 closed defect (duplicate)

widgetsInTemplate for dojox.dtl._DomTemplated widgets not working properly

Reported by: Michael Wu Owned by: Michael Wu
Priority: undecided Milestone: tbd
Component: DojoX DTL Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

I created two widgets based on "dijit/_WidgetBase" and "dojox/dtl/_DomTemplated": WidgetA and WidgetB.

In WidgetA's templateString, WidgetB is defined declarative, and widgetsInTemplate is set to true.

When WidgetA is instantiated, is gives:

TypeError: this.domNode.parentNode is null.

The problem seems to be that WidgetB's srcNodeRef isn't being set by WidgetA's widgetsInTemplate parsing code.

Manually doing parser.parse() inside WidgetA's postCreate() works well.

Attachments (1)

dojo-test-14841.zip (1.4 KB) - added by Michael Wu 8 years ago.
Test case for #14841

Download all attachments as: .zip

Change History (6)

comment:1 Changed 8 years ago by ben hockey

Owner: changed from Neil Roberts to Michael Wu
Status: newpending

Is this the same as #12644?

If not, please attach a test case

Changed 8 years ago by Michael Wu

Attachment: dojo-test-14841.zip added

Test case for #14841

comment:2 Changed 8 years ago by Michael Wu

Status: pendingnew

Attachment (dojo-test-14841.zip) added by ticket reporter.

comment:3 in reply to:  1 Changed 8 years ago by Michael Wu

Replying to neonstalwart:

Is this the same as #12644?

If not, please attach a test case

I am not sure if this is a duplicate of #12644 as I don't fully understand it. I've attached a test case (dojo-test-14841.zip) for my issue. Unzip all 3 files into a web server directory, you'll need to change dojoConfig.packages in index.html accordingly to your server path.

An online example could be access at: http://dev.witness24.com/~michael/dojo-test-case-14841/. Open with Firebug and you should see the

this.domNode.parentNode is null

error.

Thanks.

comment:4 Changed 8 years ago by ben hockey

Resolution: duplicate
Status: newclosed

Duplicate of #11440.
thanks for the test case. now i can see that it's a duplicate of #11440 which also has a patch that should fix your issue. unfortunately that patch has been on that ticket for almost 2 years. draw your own conclusions about what that means regarding the level of support for dtl.

comment:5 Changed 8 years ago by Michael Wu

Hi neonstalwart, thanks for the pointer. I'll try the patch later.

Any reason that the patch of #11440 isn't merged? Any thing that I can do to help?

Note: See TracTickets for help on using tickets.