分支树中的分页 [英] Pagination in Ext Tree

查看:351
本文介绍了分支树中的分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ext js javascript库。

I am using ext js javascript library.

这是关于分页的分页。

加载树,我正在获取完整的树数据,而我只想获取顶级或根级别,或者最多可以达到2级。

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.

我可以使用Ext.direct来提高效率吗?我的后端是delphi / pascal。

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?

谢谢。

推荐答案

不幸的是,目前TreeStore中没有页面支持。

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

关于加载树数据,默认情况下TreeStore不会尝试加载整个树,它将进行以下调用:

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

当用户单击一个树节点来展开它时,说节点的ID为12,TreeStore将尝试通过以下方式获取数据:

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

所以,如何处理节点参数,并决定返回给客户端的内容是您的Web服务的职责。

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

这篇关于分支树中的分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆