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

  • Home
  • SEARCH
  • 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 7812321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:28:01+00:00 2026-06-02T04:28:01+00:00

I am trying to write a custom widget (dialog) with dojo django templates. First,

  • 0

I am trying to write a custom widget (dialog) with dojo django templates. First, i made a simple template, which uses standard template syntax. It works fine. Then i tried to derail to django templates. Here is the template:

<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">
    <div data-dojo-attach-point="titleBar" class="dijitDialogTitleBar">
        <span data-dojo-attach-point="titleNode" class="dijitDialogTitle" id="${id}_title"></span> 
        <span data-dojo-attach-point="closeButtonNode" class="dijitDialogCloseIcon" data-dojo-attach-event="ondijitclick: onCancel" title="${buttonCancel}" role="button" tabIndex="-1">
            <span data-dojo-attach-point="closeText" class="closeText" title="${buttonCancel}">x</span>
        </span>
    </div>
    <div data-dojo-attach-point="containerNode" class="dijitDialogPaneContent bugViewContent">
            <div data-dojo-type="dijit.layout.TabContainer" style="width: 100%; height: 100%;">
                <div data-dojo-type="dijit.layout.ContentPane" title="Details" selected="true">
                    <span>{{ttt}}</span>
                </div>
                <div data-dojo-type="dijit.layout.ContentPane" title="Attachments">
                    Test
                </div>
                <div data-dojo-type="dijit.layout.ContentPane" title="Core tab">
                    Test
                </div>
                <div data-dojo-type="dijit.layout.ContentPane" title="Corporate tab">
                    Test
                </div>
                <div data-dojo-type="dijit.layout.ContentPane" title="Distribution tab">
                    Test
                </div>
            </div>
    </div>
</div>

and code:

require([
         "dojo/_base/declare",
         "dojo/ready",
         "dijit/_Widget",
         "dijit/Dialog",
         "dijit/_TemplatedMixin",
         "dojox/dtl/_DomTemplated",
         "dijit/_WidgetsInTemplateMixin",
         "dojo/text!qc_boobster/BugView.html",
         "dijit/layout/TabContainer",
         "dijit/layout/ContentPane"
        ], 
        function(declare, ready, Widget, Dialog, TemplatedMinxin, DtlDomTemplated, WidgetsInTemplateMixin, template) {
            declare("qc_boobster.BugView", 
                    [Widget, Dialog, TemplatedMinxin, DtlDomTemplated, WidgetsInTemplateMixin],
                    {
                        templateString : template,

                        ttt : "test",

                        setBug : function(aBug) {
                            console.log("BugView.setBug(");
                            console.log(aBug);
                            console.log(")");
                        },
                    });

            ready(function() {
            });
        }
);

And i call this as so:

xhr.get({
    url : "ajax/bugs/" + id,
    handleAs : "json",
    load : function(data) {
        var bugView = new qc_boobster.BugView();

        bugView.setBug(data);
        bugView.show();
    }
});

And when i try to instantiate widget prorammatically, i get the following error: You cannot use the Render object without specifying where you want to render it. Well, i looked through dojo sources and found this error string in dojox.dtl.render.dom. I occurs when object (my widget) does not have domNode set. I’ve placed breakpoint on dojox.dtl._DomTemplated.buildRendering() and saw that both domNode and srcNodeRef are undefined. I tried to add several mix-ins to my widget (see above), but none of them set these properties. Also i tried to set domNode in postCreate(), but then found in official docs, that postCreate() occurs after buildRendering(). I think that the issue is that i create my widget programmatically, but not on the top of existing DOM node.

So what am i doing wrong and how to make it work?

  • 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-02T04:28:02+00:00Added an answer on June 2, 2026 at 4:28 am

    Seems like i need inheritance like this:

    require([
         "dojo/_base/declare",
         "dojo/ready",
         "dijit/Dialog",
         "dojox/dtl/_Templated",
         "dijit/_WidgetsInTemplateMixin",
         "dojo/text!qc_boobster/BugView.html",
        ], 
        function(declare, ready, Dialog, DtlTemplated, WidgetsInTemplateMixin, template)
            ....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write a custom rendering template for use in the DisplayForm of
I'm trying to write a custom servlet (for AJAX/JSON) in which I would like
i am trying to write a custom event which should get fire when user
I'm trying to write a custom in-window confirm dialog (based on jQuery UI) that
I'm trying to write a custom fadeTo(component, x, y):void method, which takes an arbitrary
I was trying to write a custom caching mechanism for my ajax calls, which
I'm trying to write a custom cmp function for a map, a simple one
I am trying to write a custom tag. I can write attributes; however, I'm
I am trying to write a custom script that will keep a list of
I am trying to write a custom select statement in Hibernate using the getHibernateTemplate()

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.