Constructor: TreeViewOfCacheItemResult

OpenAjax.a11y.formatters.TreeViewOfCacheItemResult

new TreeViewOfCacheItemResult(cache_item_result)

Constructs a list of node results for a cache item result that can be used by tree views (i.e. XUL custom tree views)

Parameters:
Name Type Description
cache_item_result CacheItemResult Filtered cache item result object for tree view presentation
Properties:
Name Type Description
cache_item_result CacheItemResult Cache item result object reference
node_result_items Array An array of cache item result items for use be tree or list view rendering
Source:
  • scripts/formatter_tree_view.js, line 1087

Methods

<static> getOpenNodeResults() → {Array}

Returns an array of all the node result items, including the items in the children property of items with open property set to true

Source:
  • scripts/formatter_tree_view.js, line 1250
Returns:
Array of node result items optimized for a tree view
Type
Array

<static> setOpenState(flag)

Sets open state on all container items in the list Used for expanding or collapsing all leafs in a tree

Parameters:
Name Type Description
flag Boolean If true all container elements will be set to open, otherwise containers element set to close
Source:
  • scripts/formatter_tree_view.js, line 1214

<static> sortListOfNodeResults(sort_property, order) → {Array}

Sorts the list of node result items based on item property values

Parameters:
Name Type Description
sort_property String Name of property to sort, property names include: 'result', 'element', 'position'
order Number If 1 sort ascending, else sort descending
Source:
  • scripts/formatter_tree_view.js, line 1291
Returns:
Array of objects optimized for display as a tree
Type
Array