#16781 closed feature (fixed)
_AttachMixin: support container widgets
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | Dijit | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Presumably _AttachMixin doesn't handle widgets with a containerNode, because it will traverse into the containerNode looking for data-dojo-attach-point and data-dojo-attach-event nodes.
For example, assume the index.html page has:
<div data-dojo-type=ServerTitlePane> <div data-dojo-attach-point=titleBar>the title</div> <div data-dojo-attach-point=containerNode> <span data-dojo-type=ServerButton> <span data-dojo-attach-event="onclick: _onClick">click me</span> </span> </div> </div>
where ServerTitlePane and ServerButton extend _AttachMixin (but do not extend _WidgetsInTemplateMixin). When the ServerTitlePane tries to instantiate, it will presumably try to process the
<span data-dojo-attach-event="onclick: _onClick">click me</span>
and then get an exception because there's no _onClick method in ServerTitlePane.
I assume _AttachMixin has to use an algorithm like dijit/registry::findWidgets(), skipping anything beneath the containerNode. Hopefully that won't degrade performance much for the common case when templates are substituted on the client side.
Change History (2)
comment:1 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|
In [30733]: