如何从GWT中的CellTree中获取选定项目的路径 [英] How to get the path of a selected item from a CellTree in GWT

查看:155
本文介绍了如何从GWT中的CellTree中获取选定项目的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 CellTree ,其中包含一个组织列表。在模型中,每个家长都包含一个孩子的列表。
有没有简单的方法来获取选定项目的路径?或者我必须通过遍历树和通过id查找来使用通常的方法。

I have a CellTree containing a list of organisations. In the Model, each parent contains a list of a children. Is there an easy way to get the path of a selected item ? or I have to go with the usual methode by iterating through the tree and lookup by id.

谢谢

Thanks

推荐答案

CellTree本身没有任何内置功能来检索所选项目的路径。

您必须手动遍历树形结构以获取路径。您可以使用递归函数来检索路径。我做了类似的事情,但为了不同的目的(以编程方式打开CellTree中的节点)。

The CellTree itself does not have any built-in functionality to retrieve the path for the selected item.
You will have to manually traverse through your tree structure to get the path. You can use a recursive function to retrieve the path. I have done something like that but for a different purpose (programmatically opening nodes in a CellTree).

这篇关于如何从GWT中的CellTree中获取选定项目的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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