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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:05:27+00:00 2026-05-23T13:05:27+00:00

I have a client app that need to show a really big tree (It’s

  • 0

I have a client app that need to show a really big tree (It’s a mega organizational budget) , which is available via JSON queries – each budget section has a code , and s.t topic 1122 is the son of topic 11 and the father of topic 112233.

The budget tree begins with high level topics , and what I want to do is this : when a user click on a topic node (for example , “11”) , it will run a JSON query for all the sons of topic “11” , and then populate the tree with them.

So far I’ve managed to get the query to populate the tree with the high level nodes , but when you open a node , you get the same node list again.. 🙁

        XJSONDataSource yedaDS = new XJSONDataSource();
        yedaDS.setDataURL("http://api.yeda.us/data/gov/mof/budget/?o=jsonp&query=%7B%22code%22%20:%20%7B%20%22$regex%22%20:%20%22%5E0020%22%20%7D%7D");

        DataSourceTextField code = new DataSourceTextField("code","Code");
        code.setPrimaryKey(true);

        yedaDS.setTitleField("title");

        DataSourceIntegerField year = new DataSourceIntegerField("year", "Year");
        DataSourceTextField netAllocation = new DataSourceTextField("title","Title");

        yedaDS.setFields(code,year,netAllocation);

        TreeGrid remoteJsonQuery = new TreeGrid();

        remoteJsonQuery.setDataSource(yedaDS);
        remoteJsonQuery.setAutoFetchData(true);

        HStack stack = new HStack();
        stack.addMember(remoteJsonQuery);
        stack.draw();

Any ideas?

  • 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-23T13:05:28+00:00Added an answer on May 23, 2026 at 1:05 pm

    In your case, you need to have 3 main things in your DS –

    1) An Id field for each row eg – 112233

    2) The parent Id for that row — 1122 for this eg. You will have to add the foreign key relationship on this field. This is what you are missing

    3) Root Value – 11, to tell the datasource which is/ are the root elements

    As a code sample , look at the datasource code for this example, the important lines for you are –

    DataSourceIntegerField employeeIdField = new DataSourceIntegerField("EmployeeId", "Employee ID");
    employeeIdField.setPrimaryKey(true);
    employeeIdField.setRequired(true);
    DataSourceIntegerField reportsToField = new DataSourceIntegerField("ReportsTo", "Manager");
    reportsToField.setRequired(true);
    reportsToField.setForeignKey(id + ".EmployeeId");
    reportsToField.setRootValue("11");

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

Sidebar

Related Questions

If I have a WCF server app that need to inform WCF client that
I have a .NET client app that intermittently loses connection to a UNC share
Suppose I have a client side app that sends out requests to a rails
I have a Linux/c client app that connects to a WCF web service over
I have a WCF client/service app that relies on secure communication between two machines
I have a web app that lets a client define a daily rate for
I have a api app that sits behind a few client facing apps. The
I have a client and a server app on Android (that uses ZeroC -
So I have an app that uses the Zend amazon web services client. I
I have a client that has an app built with django. On every page

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.