Login Register

parent

Inheritance and calling parent's constructor

[editor: moving to the appropriate forum…]

(Using dojo 1.1.1)
Can anyone spot why the parent class's constructor is not called when constructing a new instance of my class?

In the following piece of code, dojo creates the dojoSelect widget and properly assigns it to input#dojoNode.
It also creates the mySelect widget but fails to assign it to input#myNode.

Accessing parent from child node in dijit tree

Hi All,

I've got a tree which has this data structure below
JSON

{
    "label": "name",
    "identifier": "id",
    "items": [
        {
            "id": "4",
            "name": "Achievements",
            "children": [
                {
                    "id": "20",
                    "name": "HELLO"
                }
            ]
        },
        {
            "id": "3",
            "name": "My page",
            "children": [
               
            ]
        }
    ]
}

Parent / Child relationship with Widget's templates.

Hi,

I've tried to understand how to include a child template into a parent template (perhaps it can't be possible). I will try to explain my problem.

I have a Widget A called WidA

file : mywidget/WidA.js

dojo.provide("mywidget.WidA");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");

dojo.declare("mywidget.WidA", [dijit._Widget,dijit._Templated], {

    templateString: "",
    templatePath: dojo.moduleUrl("mywidget.","templates/WidA.html"),

    constructor: function() {
    },

    postCreate: function() {
    }
});

Retrieve parentNode chain

I've been trying to get a NodeList from a parentNode chain array with the following code:

dojo.NodeList().adopt(getAncestry(searchNode))
…
function getAncestry(startNode){
	var arr = [];
	var n = startNode;
	while(n = n.parentNode){
		if(n.nodeName == 'BODY')break;
		arr.push(n);
	}
	return arr;
}

…but get a result of a NodeList which contains the ancestry node array in its first index. Ex:


dojo.NodeList().adopt(getAncestry(searchNode).forEach(function(item){
console.log("item : " + item)
})

Simple question about child/parent relation with Widget

Hello,

I have a newbies question. I want to understand the relation with child/parent (in Dojo of course ! :D).
I have written this code because i want to see the child of my BorderContainer :

Vente
 

dojo.require("dijit.TitlePane");
dojo.require("dijit.form.Button");
dojo.require("dojo.parser");
dojo.require("dojo.back");
dojo.require("dijit.Dialog");
dojo.require("dijit.layout.LayoutContainer");

Parent of Tree item

Hi all

This Probably is a very basic question, sorry.
I have a Tree(rootWidget) bound to an empty context menu (treeMenu), the context menu items/submenues are then created, dynamically according to the different tree nodes types with:
dojo.connect(treeMenu, "_openMyself", rootWidget, CreateDynMenu);

The CreateDynMenu is something like:

CreateDynMenu(e){

myNode = dijit.getEnclosingWidget(e.target).item;
...............
................
................
}
Where myNode.order is the 'Identifier' of the tree data.

Syndicate content