Ext从后台一次性加载数据,循环获取子节点数据的问题
环境 Extjs4.2
做tree一次性从后台加载数据的时候,发现返回了数据结构,包含了children子节点结合,前端还是会继续查询每个节点的子节点,最后发现是我这边TreeStore定义有问题,
这里的root写了是res。但是后台传过来的时候,子节点写的是children。
private List<MenuTree> children;
这里将后台返回数据的子节点的名字改成res。就好了。
extjs原文如下。
For the tree to read nested data, the Ext.data.reader.Reader must be configured with a root property, so the reader can find nested data for each node (if a root is not specified, it will default to ‘children’). This will tell the tree to look for any nested tree nodes by the same keyword, i.e., ‘children’. If a root is specified in the config make sure that any nested nodes with children have the same name. Note that setting defaultRootProperty accomplishes the same thing.
extjs创建一个带checkbox的树
I am regular reader, how are you everybody? This piece of
writing posted at this website is truly pleasant.
I’m not sure why but this weblog is loading very slow for me.
Is anyone else having this problem or is it a issue on my end?
I’ll check back later and see if the problem still exists.
I was wondering if you ever considered changing the page layout of your blog?
Its very well written; I love what youve got to say. But
maybe you could a little more in the way of content so people could connect with it better.
Youve got an awful lot of text for only having 1 or 2 pictures.
Maybe you could space it out better?
Saved as a favorite, I like your blog!
Asking questions are genuinely good thing if you are not
understanding something completely, except this post presents good understanding even.
It’s going to be finish of mine day, however before ending I am reading this fantastic article to increase my knowledge.
We are a group of volunteers and starting a new scheme in our
community. Your website offered us with valuable information to work on. You’ve done a formidable job and
our whole community will be thankful to you.
Attractive element of content. I just stumbled upon your web site and in accession capital to say that I acquire in fact enjoyed account your weblog posts.
Anyway I will be subscribing on your feeds or even I fulfillment you get entry to persistently rapidly.
Greetings! I know this is kinda off topic however
, I’d figured I’d ask. Would you be interested
in trading links or maybe guest writing a blog article
or vice-versa? My blog goes over a lot of the same subjects as yours and I feel we could greatly benefit from each other.
If you’re interested feel free to send me an e-mail.
I look forward to hearing from you! Superb blog by the way!