AllTreesSelection 对象

您可以使用 AllTreesSelection 对象获取同一模块内所有活动视图中当前选定树实体的列表。您可以通过遍历该列表来检索选定的实体。

例如,要在“测试实验室”模块的“执行网格”视图中检查选定测试实例的权限,请执行以下操作:

set selectedTestInstances =
  AllTreesSelection.TreeSelection("ExecutionGridView")
for each selectedEntity in selectedTestInstances
       if selectedEntity.Id <> 1 then
          checkPermission(selectedEntity)
       end if
next

AllTreesSelection 对象具有以下属性:

属性

读/写

类型

描述

Count

长型

当前可以访问的树的数量。

ViewNameById

字符串

可用于特定索引的视图。

TreeSelectionById

列表

列出与特定索引对应的视图的选定树实体。

TreeSelection 列表 列出特定视图的选定树实体。