Opened 8 years ago

Closed 8 years ago

#18184 closed defect (invalid)

BorderContainer in _WidgetsInTemplateMixin with outside BorderContainer

Reported by: dmol Owned by: dmol
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.10.0
Keywords: Cc:
Blocked By: Blocking:



I have outer BorderContainer?, which contains my custom Widget, which contains BorderContainer? inside it. When I insert the widget via button, as described in reference [1], then all works OK.

But when I try to insert it right after loading of main template, I got:

dojo/parser::parse() error 
Error {stack: (...), message: "Tried to register widget with id==dijit_layout_BorderContainer_0 but that id is already registered"

When I disable my another custom widget (LoginArea?), then I got no error, but the inner BorderContainer? isn't layered correctly (as if no .startup() has been invoked).


Attachments (5)

index.html (2.5 KB) - added by dmol 8 years ago.
HomeArea.js (718 bytes) - added by dmol 8 years ago.
LoginArea.js (779 bytes) - added by dmol 8 years ago.
HomeArea.html (489 bytes) - added by dmol 8 years ago.
LoginArea.html (47 bytes) - added by dmol 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by dmol

Attachment: index.html added


Changed 8 years ago by dmol

Attachment: HomeArea.js added


Changed 8 years ago by dmol

Attachment: LoginArea.js added


Changed 8 years ago by dmol

Attachment: HomeArea.html added


Changed 8 years ago by dmol

Attachment: LoginArea.html added


comment:1 Changed 8 years ago by ben hockey

Owner: set to dmol
Status: newpending

i think the problem is that you're not waiting for the parser to finish it's work before you add your custom widget and this causes a double parse.

var promise = parser.parse();
require([ ... ], function ( ... ) {
    var widget = new Thing();
    // wait for parsing to finish before adding anything...
    promise.then(function () {

does it fix it if you wait for the parser to finish?

comment:2 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.