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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:57:44+00:00 2026-05-26T18:57:44+00:00

I wanted to create a 3 level dijit.Tree , like that: -root | –level1

  • 0

I wanted to create a 3 level dijit.Tree, like that:

-root
|
--level1
 |
 --level2

I thought it would be really simple since there’s a code snippet in this tutorial (example 1). But somehow I manage to fail.
This is my dojo code (variable names are in Polish, I hope it’s not a problem):

modelRaportow = new dijit.tree.ForestStoreModel({
    store: new dojo.data.ItemFileReadStore({
        url: "logika/getJSON/getStatusRaportow.php"
    }),
    query: {typ: 'galaz'},
    rootId: 'statusRaportuRoot',
    rootLabel: 'Status raportu',
    childrenAttrs: 'raporty'
});

drzewoRaportow = new dijit.Tree({
    openOnClick: true,
    model: modelRaportow,
    showRoot: true,
    persist: false
}, "target-status-raportow");

drzewoRaportow.startup();

This is my JSON returned by logika/getJSON/getStatusRaportow.php (again, names are in Polish):

{
    "identifier":"id",
    "label":"status",
    "items": [
        {"id":0,"status":"zaakceptowane","typ":"galaz"
            "raporty":[{"_reference":1},{"_reference":2},{"_reference":3}]},
                {"id":1,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":3,"status":"Raport0","typ":"lisc"},
                {"id":2,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":1,"status":"Raport1","typ":"lisc"},
                {"id":3,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":3,"status":"Raport2","typ":"lisc"},
        {"id":4,"status":"odrzucone","typ":"galaz"
            "raporty":[{"_reference":5},{"_reference":6},{"_reference":7}]},
                {"id":5,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":1,"status":"Raport3","typ":"lisc"},
                {"id":6,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":3,"status":"Raport4","typ":"lisc"},
                {"id":7,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":3,"status":"Raport5","typ":"lisc"}
]}

And finally, this is what I’m getting: img – root node and lvl 1 nodes returned by query, no child nodes.

The question is – where is my mistake? Can anyone see it?

  • 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-26T18:57:45+00:00Added an answer on May 26, 2026 at 6:57 pm

    I have a partial answer: by stepping through the code in a similar situation, I’ve discovered that it expects childrenAttrs to be an array, so it should be:

    childrenAttrs: ['raporty']
    

    but I still cannot get the third level to appear in my case.

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

Sidebar

Related Questions

I wanted to create a very simple method that switches between views in a
I wanted to create my own Python exception class, like this: class MyException(BaseException): def
I wanted to create a page with a simple button which runs away from
I have to create a simple, one-level menu in an ASP.NET website clicking on
I wanted to create smth similar to this one Kansas county map where user
I wanted to create a new property on a table in my model.. Basically
I wanted to create a control with a TextBox and to bind TextBox.Text property
I wanted to create one js file which includes every js files to attach
I wanted to create some subdirectories inside my blob. But it is not working
So I wanted to create a toggle-button for a table, where I can make

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.