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 6583289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:23:22+00:00 2026-05-25T16:23:22+00:00

My Dojo app contains several widgets, which are all auto-registered in dijit.registry (an instance

  • 0

My Dojo app contains several widgets, which are all auto-registered in dijit.registry (an instance of dijit.WidgetSet). I would like to make use of the filter() (Link) or map() (Link) method to apply global changes to certain widgets filtered by a custom property pattern defined in the methods’ callback functions.

Dumping the registry by console.log(dijit.registry); proves that it is filled with widgets:

console.log(dijit.registry);

Just to test the filter() method I did the following (exactly in the same scope as the above mentioned console.log(dijit.registry);):

var widgets = dijit.registry.filter(function(w, i) {
    return true;
});

console.log(widgets);

But I got the following output:

enter image description here

Similar behaviour when using the map() method:

var widgets = dijit.registry.map(function(w) {
    return w;
});

console.log(widgets);

… I get an empty array then.

What’s going on here, what went wrong?

FYI: Making single console.log(w); inside the callback functions doesn’t output anything, they even aren’t invoked, meaning that dijit.registry isn’t even being iterated by the two methods.

console.log(dijit.registry._hash); prints the object containing 12 properties (widgets). for(var w in dijit.registry._hash) { /* ... */ } doesn’t work at all – it misteriously doesn’t jump into the loop.

  • 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-25T16:23:22+00:00Added an answer on May 25, 2026 at 4:23 pm

    The snippet

    var widgets = dijit.registry.filter(function(w, i) {
        return true;
    });
    
    console.log(widgets);
    

    wasn’t called inside a dojo.addOnLoad(function() { /* ... */ });, which led to the case created widgets weren’t registered yet and couldn’t be iterated via dijit.registry.filter().

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

Sidebar

Related Questions

I have a rally.sdk.ui.basic.Dropdown menu in a Rally App that I would like to
I am building Dojo mobile app. I have a Json file like: { Introduction:
I am building Dojo mobile app. I have a Json file like: { Introduction:
How can I make dojo textbox dijit to remember previously entered values, like a
Dojo custom widgets can be internationalized via the _templated mixin following the steps outlined
I am using dojo 1.6 and using dijit.calendar in a project and it's working
I have the following nested layout in a dojo 1.4 app: BorderContainer 1 -->
I have written an app using dojo that allocates a lot of data during
In an Dojo 1.7 AMD web app you can define also arbitrary data in
I'm working on a web app which will need to work offline. I'm looking

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.