I’m attempting to populate a tree structure with simple ModelData returned by a RpcProxy call (nothing fancy, no Json, no Hibernate, just simple Java) My code looks very similar to the AsyncTree example).
I used the ‘BasicTree’ example to get started and then modified to look like the ‘AsyncTree’. I assumed that the server-side should return the whole tree (as in the BasicTree Example but I see it’s really supposed to only return the children of the node passed in the Rpc call (silly me).
Me thinks I’m not understanding TreePanel, Tree… etc. Please, anybody know of a decent online doc. or book that explains this is detail?
You’ll find there’s actually a nice concise example of serving up async based tree content that’s included with the GXT 2.x library.
Extract the gxt.xxx.zip file somewhere, and take a look at
samples\examples\src\com\extjs\gxt\samples\server\FileServiceImpl.javaIt only contains a few methods, where it simply builds up 1 layer of the tree model at a time.
You can view the corresponding client-side code in
examples\src\com\extjs\gxt\samples\client\examples\treepanel\AsyncTreePanelExample.java