Opened 16 years ago
Last modified 9 years ago
#1983 closed feature
widgetsInTemplate does not process nested widgets — at Version 6
Reported by: | Owned by: | liucougar | |
---|---|---|---|
Priority: | low | Milestone: | 1.0 |
Component: | Dijit | Version: | 0.4 |
Keywords: | widgetsInTemplate sub widgets | Cc: | |
Blocked By: | Blocking: |
Description (last modified by )
Sub widgets that are wrapped by, for instance, accordion panes or split panes, aren't processed. So dojoAttachPoint or dojoAttachEvent are ignored for those sub widgets.
I fixed by setting an attribute on nodes (watermark) and then check for the mark. If there is no mark, then its a wrapper widget (or something like that), so lets process its children.
On DomWidget?.js near line 586 I made:
if(subnodes[i].getAttribute('dojoType')){ subnodes[i].setAttribute('_isSubWidget', true); } subnodes[i].setAttribute('_watermark', true);
and near line 618 change to:
if(cwidget.extraArgs['_watermark'] && (cwidget._processedSubWidgets || !cwidget.extraArgs['_issubwidget'])){ continue; }
Change History (9)
comment:1 Changed 16 years ago by
Changed 16 years ago by
Attachment: | test_widgetsInTemplate.html added |
---|
Changed 16 years ago by
Attachment: | test_widgetsInTemplate.2.html added |
---|
Changed 16 years ago by
Attachment: | test_widgetsInTemplate.3.html added |
---|
This simple test shows that wrapped sub widgets aren't attached
comment:2 Changed 15 years ago by
Component: | General → Widgets |
---|---|
Milestone: | → 0.9 |
Owner: | changed from anonymous to bill |
comment:3 Changed 15 years ago by
Component: | Widgets → Dijit |
---|---|
Milestone: | 0.9 → 1.0 |
Owner: | changed from bill to liucougar |
comment:4 Changed 15 years ago by
Milestone: | 1.0 → 2.0 |
---|
comment:6 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Milestone: | 1.3 → future |
Summary: | widgetsInTemplate does not process new widgets created dynamically → widgetsInTemplate does not process nested widgets |
Type: | defect → enhancement |
I've got a feeling that we will switch to using the DTL code before addressing this issue.
For now, you just need to workaround by creating widgets like the TabContainer and it's children programatically, and then attaching them under your widget.
You need to supply a testcase w/javascript file, template file, and test html file.