Module: alfresco/navigation/Tree

alfresco/navigation/Tree

Author:
  • Dave Draper
License:
Source:

Members

childRequestPublishGlobal :boolean

Indicates whether or not requests to get child data will be published globally using the publishTopic that has been configured.
Type:
  • boolean
Since:
  • 1.0.39
Default Value:
  • true
Source:

childRequestPublishPayload :object

This is the payload that will be published to request child data when a publishTopic has been configured.
Type:
  • object
Since:
  • 1.0.39
Default Value:
  • null
Source:

containerId :string

This should be set when the current context is a site, typically this will be set to "documentlibrary"
Type:
  • string
Default Value:
  • null
Source:

cssRequirements :object[]

An array of the CSS files to use with this widget.
Type:
  • object[]
Default Value:
  • [{cssFile:"./css/Tree.css"}]
Source:

customCssClasses :string

Additional space separated CSS classes to be applied to the root DOM node of the widget.
Type:
  • string
Source:

filterPaths :array

This is an array of Regular Expressions that should match pathes to show. At least one of the Regular Expressions in the array needs to pass true for the tree node to be displayed. To show all paths this should be left as null (the default value).
Type:
  • array
Default Value:
  • null
Source:

filterPrefsName :string

Type:
  • string
Default Value:
  • "docListTreePref"
Source:

i18nRequirements :object[]

An array of the i18n files to use with this widget.
Type:
  • object[]
Default Value:
  • [{i18nFile: "./i18n/Tree.properties"}]
Source:

publishPayloadType :string

By default the payload type will the current item. This will automatically be set to be the tree node clicked.
Type:
  • string
Default Value:
  • "CURRENT_ITEM"
Source:

publishTopic :string

This is the topic that is published when a node on the tree is clicked. The data applied to the filter is the value of the node clicked. By default it is expected that the tree represents a path so is set to the path changed topic.
Type:
  • string
Default Value:
Source:

rootLabel :string

Type:
  • string
Default Value:
  • "documentlibrary.root.label"
Source:

rootNode :string

This should be set if "siteId" is not set.
Type:
  • string
Default Value:
  • null
Source:

rootValue :string

This is the value that should be given to the root node. This node is not actually requested but is simply generated on instantiation. The value assigned to it is important because it will be included as the filter data when it is clicked.
Type:
  • string
Source:

showRoot :boolean

Indicates whether or not the root node of the tree should be displayed or not.
Type:
  • boolean
Default Value:
  • true
Source:

siteId :string

Type:
  • string
Default Value:
  • null
Source:

templateString :string

The HTML template to use for the widget.
Type:
  • string
Source:

treeNodeDisablementConfig :object

Configuration rules that determine when a tree node should be disabled.
Type:
  • object
Since:
  • 1.0.94
Default Value:
  • null
Source:

Methods

getTargetQueryObject() → {object}

Gets an object containing the query parameters to include when requesting child nodes. The object returned will differ slightly depending upon whether the tree is configured to represent a site or a general node. A general node query will include a library root parameter (this will typically map to either company home, user home or shared files but can be any valid node).
Source:
Returns:
The query object to include when requesting child nodes.
Type
object

getTargetUrl() → {string}

Source:
Returns:
The root of the URL to use when requesting child nodes.
Type
string

onClick(item, node, evt)

Parameters:
Name Type Description
item object The store item represented by the clicked node
node object The node on the tree that was clicked
evt object The click event
Source:

onNodeCollapse(item, node)

Parameters:
Name Type Description
item object The store item represented by the collapsed node
node object The node on the tree that was collapsed
Source:

onNodeExpand(item, node)

Parameters:
Name Type Description
item object The store item represented by the opened node
node object The node on the tree that was opened
Source:

postCreate()

Creates the a dijit/Tree widget.
Source:

processDisablementRule(node, rule) → {boolean}

Processes any configured disablement rules for tree nodes. Please note that at present only the "contains" rule is supported. If other rules are required then please raise an issue for them to be implemented.
Parameters:
Name Type Description
node object The node item to evaluate the data of
rule object The rule configuration to process
Since:
  • 1.0.94
Source:
Returns:
Whether or not the tree node should be disabled
Type
boolean

requestSidebarResize()

Publishes a request to resize the side bar (if the tree is not in a side bar then this will have no effect).
Source:

<inner> __click(nodeWidget, e, doOpen, func)

Extended to ignore clicks on disabled nodes.
Parameters:
Name Type Description
nodeWidget object The tree node widget clicked
e object The click event
doOpen boolean Whether or not to open
func string A click callback function.
Since:
  • 1.0.94
Source:

Events

childRequestPublishTopic

This is a topic that can be published to request child data.
Type:
  • string
Since:
  • 1.0.39
Default Value:
  • null
Source: