Constructor: TreeViewOfFilteredCacheItemResults

OpenAjax.a11y.formatters.TreeViewOfFilteredCacheItemResults

new TreeViewOfFilteredCacheItemResults(filtered_cache_item_results)

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

Parameters:
Name Type Description
filtered_cache_item_results FilteredCacheItemResults Filtered cache item result object for tree view presentation
Properties:
Name Type Description
filtered_cache_item_results FilteredCacheItemResults Filtered cache item result object reference
cache_item_results Array An array of cache item result items for use be tree or list view rendering
Source:
  • scripts/formatter_tree_view.js, line 815

Methods

<static> getOpenCacheItemResults(all_flag) → {Array}

Creates an array of cache item result objects with properties optimized for customized tree view display, that can be sorted

Parameters:
Name Type Description
all_flag Boolean If true all elements of the list including children are returned without levels
Source:
  • scripts/formatter_tree_view.js, line 958
Returns:
Array of objects optimized for display as a XUL custom tree
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 923

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

Sorts an array of cache item results based on one of the properties of an item

Parameters:
Name Type Description
sort_property String Name of property to sort (i.e. 'element', 'violation' ..)
order Number If 1 sort ascending, else sort descending
Source:
  • scripts/formatter_tree_view.js, line 1018
Returns:
Sorted list of cache items
Type
Array