Ticket #4980 (new defect)
ContentPane setContent() complaining about creating duplicate popup widgets
| Reported by: | gid@… | Owned by: | bill |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0 |
| Component: | Dijit | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: | gid@… |
Description (last modified by bill) (diff)
I have an application that uses a ContentPane? to replace the majority of the content of the site. Recently when upgrading from 0.9-release to the 1.0 beta I'm getting errors like this: "Couldn't create widgets in djRightPane Error: Tried to register widget with id=SearchHelp? but that id is already registered."
This happens when clicking on the various button on the site that switches the content. Basically what's happening is if I call setContent() with the html that contains the SearchHelp? widget, then swap out the content without something else, and then switch back to the first html with the SearchHelp? widget, it's complaining that SearchHelp? is already defined, this seems to make setContent() not quite as useful as it can no longer redefine an widget with the same id.
Shouldn't all the widgets contained in the ContentPane? go out of scope when setContent() is called so they can be redfined by the new html? Was something to this nature changed between 0.9 and 1.0 beta? Or maybe is this a hidden option somewhere that can alter the behavior of redefining widgets?
I realize this is kind of a vague description, I can try to cut up a quick proof of concept if need be. I'm using a custom build from svn r11285 if that makes a difference.
ttrenka reply on the forums: It shouldn't.
One of the main complaints about Dijits between 0.9 and now is that it was not preserving the attributes of HTML nodes passed to it; that was changed so that it would. Odds are, this is a side effect of what you're trying to do.
If you could file a ticket at trac.dojotoolkit.org (log in as guest/guest) with a description of the issue (probably you can just paste this forum post in), that'd be awesome.