Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
288 views
in Technique[技术] by (71.8m points)

extjs - Pagination in Ext Tree

I am using ext js javascript library.

This is regarding pagination for ext tree.

While loading tree, i am fetching complete tree data, whereas I wish to fetch only the top level or root level or maybe max upto 2 levels.

I wish to fetch data at more depths, on demand. If user expands the node, then i wish to fetch the data for that node.

My focus is on implementing pagination for the tree.

Can i use Ext.direct for more efficient performance? My backend is delphi/pascal.

What is the more efficient way for using something similar to pagination in grid in ext tree?

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Unfortunately, there is no paging support in the TreeStore at this moment.

In regard of loading tree data, the TreeStore by default won't try to load the whole tree, it will make the following call instead:

GET http://your_web_service/some_tree?node=root

When user clicks on a tree node to expand it, say the node's id is "12", the TreeStore will try to fetch data by:

GET http://your_web_service/some_tree?node=12

So, how to deal with the node parameter and decide what to return to the client are the responsibilities of your web service.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...