Changes between Initial Version and Version 1 of Ticket #11337

Jun 23, 2010, 11:51:55 PM (11 years ago)

Thanks, please attach a test case using the Attach File button.

Try to narrow it down some... like does the TabContainer need to be involved? Does the problem only happen with your custom widget or anytime that you do attr("content", accordionContainer.domNode)?

Normally ContentPane calls the parser on it's new contents, but normally new contents are strings. I guess that when the new contents are dom nodes we shouldn't run the parser.

In any case you should be able to work around the problem by setting parseOnLoad: false for your ContentPane.


  • Ticket #11337

    • Property Milestone changed from tbd to future
    • Property Summary changed from Adding AccordionContainer as contents of ContentPane causes duplicate ID to ContentPane: setting AccordionContainer as contents causes duplicate ID
  • Ticket #11337 – Description

    initial v1  
    1 I have a TabContainer, which is parent to a ContentPane.  I attempt to set the "content" attr of that ContentPane with this line:
     1I have a !TabContainer, which is parent to a !ContentPane.  I attempt to set the "content" attr of that !ContentPane with this line:
    34this.buddyTripsAccordion.attr("content", this.buddyTrips.domNode);
    57and I get this error in the firebug console:
    710Error parsing in _ContentSetter#Setter_dijit_layout_ContentPane_1_1 Error: Tried to register widget with id==tripListAccordion but that id is already registered { message="Tried to register widge...d is already registered",  more...}
    9 The variable "buddyTrips" is an instance of a custom widget called "TripList," which contains the following AccordionContainer definition:
     13The variable "buddyTrips" is an instance of a custom widget called "!TripList," which contains the following !AccordionContainer definition:
    1016<div dojoType="dijit.layout.AccordionContainer" id="tripListAccordion" buttonWidget="rides.widget.TripListAccordionButton" class="tripListAccordion" dojoAttachPoint="accordionContainer" duration="200" >. 
    1218I am certain that this widget is only added once.  This error happens 4 lines after I programmatically create the TripList widget, so there's no time for anything else to happen to this object.  I can't figure out why this ID would be getting registered twice; I'm concluding it must be a bug.
    15 In case it matters, here's the definition of my TabContainer/ContentPane (I'm adding the TripList to the "buddyStuffAccordion" one)
     21In case it matters, here's the definition of my !TabContainer/!ContentPane (I'm adding the !TripList to the "buddyStuffAccordion" one)
    1624<div dojoType="dijit.layout.TabContainer" dojoAttachPoint="accordionContainer" useMenu="false" useSlider="false" class="leftHandSummary">
    1725                <div dojoType="dijit.layout.ContentPane" dojoAttachPoint="invitesAccordion" title="Buddy Requests"> </div>
    1826                <div dojoType="dijit.layout.ContentPane" dojoAttachPoint="buddyStuffAccordion" title="Buddy Stuff"> </div>
    1927        </div>