Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 651877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:12:36+00:00 2026-05-13T22:12:36+00:00

I have developed a custom dijit Templated Widget. I have to do some DOM

  • 0

I have developed a custom dijit Templated Widget. I have to do some DOM manipulation of the children of the containerNode. Everything works fine, except when I have two of the Widgets loaded, and the manipulation of the children of the containerNode seems to affect all of the Widgets of the same type, not just the particular instance of the widget.

I think I have narrowed it down to this part of my code where I “unload” the “children” I am executing the following function:

popPage: function() {
  if (this._pagesLoaded) {
    var i = this._pagesLoaded - 1;
    var y = this.containerNode.children[i];
    if (typeof y !== "undefined") {
      this.containerNode.removeChild(y);
    }
    var page = this.pages.pop();
    page.unsetPage(); //Internal sub object cleanup
    page.destroyRecursive();
    this.endPageLoaded--;
    this._calcPagesLoaded();  //recalcs this._pagesLoaded
  }
},

When I seem to execute this, it seems that the child is removed from the DOM of all Widgets. It just doesn’t make any sense, and manually inspecting things in Firebug (like dijit.byId("logScroller62").containerNode.children) shows that the browser thinks everything is seperate and I get two different sets of results for two different instances.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:12:37+00:00Added an answer on May 13, 2026 at 10:12 pm

    It appears that I had an initialisation/scoping issue. I was keeping my child objects in an array. I had initialised the array in the property definition of my dojo Object Prototype by doing the following:

    pages: [],
    

    But it seems that this causes a scoping issue, as simple change to:

    pages: null,
    

    And then adding the initialisation to the postCreate function of the Widget like:

    this.pages = [];
    

    Seems to have fixed the problem. I am not sure why something like this causes a scoping issue, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed some custom DAO-like classes to meet some very specialized requirements for
we have a website developed in java and .net. it works fine. but now
I have developed a custom binding which works over http and therefore returns http
I have developed a custom webpart which is being displayed correctly and has some
I have a custom developed CMS where users can enter some content into a
We have developed a website, which was wroking fine until some days back, but
I have developed a little javscript widget to turn some nested <ul> blocks into
i have developed custom widget and added into qtcreator. custom widget i have developed
I have developed an SSIS custom task component. It uses a connection manager of
We have our own custom calendar in our portal which is developed in Java.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.