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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:21:34+00:00 2026-05-12T12:21:34+00:00

this was my first dojo build so please excuse my ignorance in this matter.

  • 0

this was my first dojo build so please excuse my ignorance in this matter.

I’ve just created my custom build from dojo build system using the following (very simplified) profile:

dependencies = {
stripConsole: "normal",

layers: [       
    {
        name: "../dijits/cx/dijitsCXbuild.js",
        copyrightFile: "CopyrightCX.txt",
        dependencies: [
            "dojo.parser",
            "dijit.dijit",               
            "dijit._Widget",
            "dijit._Templated",
            "dijit._Container",
            "dojo.i18n",
            "dojo.NodeList-fx",
            "dojox.grid.cells",
            "dojox.grid.DataGrid",
            "dojox.layout.GridContainer",
            "dijit.TitlePane",
            "dijits.cx.TaskPanel",
            "dijits.cx.Identify"
        ]
    }
],

prefixes: [        
    [ "dijit", "../dijit" ],
    [ "dojox", "../dojox" ],
    [ "dijits.cx", "../dijits/cx" ]
]

}

… well, it all proceeds fine and I get my own package with everything I requested. Then in my webapp I include the following

<script type="text/javascript">
  djConfig = {
    isDebug:false,
    parseOnLoad:true,
    locale:getLocale()
  };
</script>

<script type="text/javascript" src="Lib/cxdojo/dojo/dojo.js"></script>
<script type="text/javascript" src="Lib/cxdojo/dijits/cx/dijitsCXbuild.js"></script>

… looks ok, until the code needs to instantiate the first dijit and it fails with the notorious : “dijits.cx. TaskPanel is not a constructor.”

I can get rid of this problem by including the “dojo.require()” but that’s something I though I’ll get rid of by creating my custom own build. Any ideas of what am I doing wrong or what shall I do in order to avoid that ‘dojo.require()’ lines…
thanks heaps.

  • 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-12T12:21:34+00:00Added an answer on May 12, 2026 at 12:21 pm

    You still need the dojo.require in your file. The compressed build just prevents the dojo.require from doing a GET request for the file that is required by concatenating all the files into one file and shrinking it. This saves cycles on page load quite a bit (as I’m sure you have seen by now).

    If you really want to get rid of the many dojo.require (which I’m not too crazy about because I like seeing what’s used in the page), you can do something like this:

    dojo.provide('my.main');
    dojo.require('dijit.cx.TaskPane');
    ... all the other dojo.require statements ...
    

    Then put this in a file in a directory parallel to dojo:

      Lib/cxdojo/my/main.js
      Lib/cxdojo/dojo/dojo.js
      .. etc ...
    

    Then change your dependencies to be:

               dependencies: [
                        "my.main"
                ]
    

    Then in your file, you can include it with the script tag:

     <script type="text/javascript" src="Lib/cxdojo/my/main.js"></script>
    

    Then, you only need one require:

      dojo.require('my.main');
    

    Another advantage of this approach is that you only need to change one file (the /my/main.js) when you add a module to your application.

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

Sidebar

Related Questions

I am following this example (First comment), How to create a custom ListView with
Using Dozer to map two objects, I have: /** /* This first class uses
#include <iostream> using namespace std; // This first class contains a vector and a
Code first: '''this is main structure of my program''' from twisted.web import http from
I have this issue: first, I execute a SQL query using Java and then
I am new to DoJo development so this could be basic. I have created
I have this terrible problem with IE 7/8/9. I wrote an app using Dojo
I have this problem I'm using DataGrid + dojo.store.JsonRest as store. I want to
I'm using Dojo 1.5 to create a dijit.form.Select with some data from a datastore.
First of all there is a question/answer for this already: Constrain position of Dojo

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.