Hi everyone
I have tried to do the same as the sample says but using JSON instead of XML
http://www.smartclient.com/index.jsp...WT#treeLoadXML
When i do it using XML, it works perfectly, but it only loads first childs when i use JSON.
Here is the XML:
	And here is the JSON:
	
	Did anyone deal with this?
Thanks!
					I have tried to do the same as the sample says but using JSON instead of XML
http://www.smartclient.com/index.jsp...WT#treeLoadXML
When i do it using XML, it works perfectly, but it only loads first childs when i use JSON.
Here is the XML:
Code:
	
	<response> <errors /> <data> <project> <id>3</id> <name>Checho Project</name> <sprints> <project> <id>4</id> <name>Backlog</name> </project> </sprints> </project> </data> </response>
Code:
	
	 
{"response":
   {"errors":"","data":
         {"project":[{"id":1,"name":"Bee Project","sprints":
                                                     {"project":[{"id":3,"name":"sprint3"},{"id":4,"name":"sprint2"},{"id":2,"name":"sprint1"}]}},
                        {"id":5,"name":"Checho Project","sprints":
                                                      {"project":{"id":6,"name":"Backlog"}}}]
         }
   }
}
Code:
	
		private ProjectDS(String id) {
		setID(id);
		setRecordXPath("/response/data/*");
		// setRecordXPath("/Employees/*");
		// DataSourceTextField nameField = new DataSourceTextField("Name", "Name", 128);
		//
		// DataSourceIntegerField employeeIdField = new DataSourceIntegerField("EmployeeId", "Employee ID");
		// employeeIdField.setPrimaryKey(true);
		// employeeIdField.setRequired(true);
		DataSourceTextField idField = new DataSourceTextField("id", "Id", 128, true);
		idField.setHidden(true);
		idField.setPrimaryKey(true);
		DataSourceTextField itemNameField = new DataSourceTextField("name", "Item", 128, true);
		DataSourceField reportsToField = new DataSourceField();
		reportsToField.setName("sprints");
		reportsToField.setChildrenProperty(true);
		setFields(idField, itemNameField, reportsToField);
		setDataFormat(DSDataFormat.JSON);
		setDataURL("bee_gui/sc/ds.xml");
		setClientOnly(true);
	}
Thanks!

Comment