title: SmartGWT - How to change the behavior of the DataSource object?
body: <p>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. </p>
  
  <p>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. </p>
  
  <p>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.. :( </p>
  
  <pre><code>        XJSONDataSource yedaDS = new XJSONDataSource();
          yedaDS.setDataURL("http://api.yeda.us/data/gov/mof/budget/?o=jsonp&amp;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();
  </code></pre>
  
  <p>Any ideas? </p>