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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:50:31+00:00 2026-06-12T13:50:31+00:00

When I setup dojoConfig with async: true , my DateTextBox doesn’t get rendered, but

  • 0

When I setup dojoConfig with async: true, my DateTextBox doesn’t get rendered, but
when I use async: false everything works fine; But I need async mode for to be able to use AJAX long time polling. How can I resolve this issue so my control is rendered?

Here is my code:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="dijit/themes/claro/claro.css">
<style>
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    padding: 0;
}
</style>
<script>dojoConfig = {async: true}</script>
<script src='dojo/dojo.js'>
</script>
<script>
require(["dojo/ready", "dijit/form/Button", "dojo/dom", "dijit/registry"], function(ready, Button, dom, registry){
    ready(function(){
        // Create a button programmatically:
            var myButton = new Button({
                label: "button"
            }, "topButton");
    });
});


require(["dojo/ready", "dijit/form/Button", "dojo/dom"], function(ready, Button, dom){
    ready(function(){
        // Create a button programmatically:
        var myButton = new Button({
            label: "button"
        }, "leftButton");
    });
});

require(["dojo/ready", "dijit/form/DateTextBox", "dojo/dom", "dojo/parser"], function(ready, DateTextBox, dom, parser){
    ready(function(){
        // Create a button programmatically:
        var dateTextBox = new DateTextBox({
            value: new Date(2009, 0, 20)
        }, "centerPicker");
    });
});

require(["dojo/ready", "dijit/form/Button", "dojo/dom"], function(ready, Button, dom){
    ready(function(){
        // Create a button programmatically:
        var myButton = new Button({
            label: "button"
        }, "bottomButton");
    });
});

require(["dojo/ready", "dijit/registry", "dijit/layout/BorderContainer", "dijit/layout/ContentPane"],
        function(ready, registry, BorderContainer, ContentPane){
            ready(function(){
                var appLayout = new BorderContainer({
                    design: "headline"
                }, "appLayout");
                 
                appLayout.addChild(
                    new ContentPane({
                        region: "top",
                        content: registry.byId("topButton")
                    })
                );
                appLayout.addChild(
                    new ContentPane({
                        region: "left",
                        content: registry.byId("leftButton")
                    })
                );
                appLayout.addChild(
                    new ContentPane({
                        region: "center",
                        content: registry.byId("centerPicker")
                    })
                );
                appLayout.addChild(
                    new ContentPane({
                        region: "bottom",
                        content: registry.byId("bottomButton")
                    })
                );
                 
                // start up and do layout
                appLayout.startup();
            });
        });
</script>
</head>
<body class="claro">
<style>
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    padding: 0;
}

#appLayout {
    height: 100%;
}
</style>
<div id="appLayout" class="demoLayout"></div>
<button id="topButton" type="button"></button>
<button id="leftButton" type="button"></button>
<div id="centerPicker"></div>
<button id="bottomButton" type="button"></button>
</body>
</html>
  • 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-06-12T13:50:33+00:00Added an answer on June 12, 2026 at 1:50 pm

    If you build a layer of your dependencies, this issue will perish. Problem is, that the DateTextBox has more dependencies then the BorderContainer – and therefore the require of inputelement finishes downloads later then the require in your layout..

    This in turn makes dojo.ready queue the callbacks in a ‘wrong’ fashion, other then what you had hoped for. The .ready has a list of functions to call, once all dependencies are downloaded – but it is ordered in the way your script queues it.

    To overcome this you could use a ‘mutex’, because in some odd situations – the order could be queued as you design needs.. You must make logic similar to:

    1. give the ContentPane with region:center an id.
    2. if registry.byId(centerPicker) != undefined: centerRegionContentPane.addChild(registry.byId(centerPicker)) in the layout section.
    3. If registry.byId(centerRegion) != undefined: registry.byId(centerRegion).addChild(centerPickerWidget) under datebox section.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Setup everything looks good, certs, provisions, etc. App starts to download and then get
Setup For this question, I'll use the following three classes: class SolarSystem < ActiveRecord::Base
Setup: I am doing an ajax-jsonp call, which is working fine. The callback function
SETUP: Using Google Apps Script's UI (doGet) with tabPanel option. At the bottom of
Setup: A--< B >-- C . On A there is a RFS on B,
setup.py from distutils.core import setup import py2exe setup(console=['program.py']) The error Traceback (most recent call
Setup I am using custom Forms Authentication - all standard stuff. In the Login
Setup iMac 10.7.4, Eclipse Indigo, Pydev, Python 2.7 I’m trying to install the Tweepy
Setup: Bash Ruby 1.9.2 highline (1.6.13) Description: I'm fairly used to highline with some
Setup iMac OSX 10.7.4, Hi there, I am trying to install Homebrew on my

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.