- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
Mixes In
Members
-
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:
-
publishGlobal :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:
-
publishPayload :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:
-
target :string
-
The URL prefix to use for requesting child data. This will only be used if a publishTopic has not been configured.
Type:
- string
- Default Value:
- null
- Source:
Methods
-
filterChildren(item, index) → {boolean}
-
Filters the children based on whether or not their "path" attribute matches any of Regular Expression configured in the hidePaths attribute.
Parameters:
Name Type Description item
object The current item to check index
number The index of the item in the original array - Source:
Returns:
true if the item should be kept- Type
- boolean
-
getChildren(object, options)
-
Makes an asynchronous request to retrieve the children of the supplied parent object. It immediately returns a Deferred object that is also passed as part of the request configuration. The Deferred object is resolved by either the success or failure callback handler depending upon the result of the request.
Parameters:
Name Type Description object
object The parent to retrieve the children for options
object The options for the query (these are currently ignored) - Source:
-
onChildren(deferred, parent, subscriptionHandles, payload)
-
Handles child data provided when a publishTopic has been configured to request child data.
Parameters:
Name Type Description deferred
object The deferred object to resolve with the child data parent
object The parent node in the tree subscriptionHandles
object[] Subscription handles created for the request that need to be removed payload
object The payload containing the child data. - Since:
- 1.0.39
- Source:
-
onChildRequestFailure(response, originalRequestConfig)
-
Parameters:
Name Type Description response
object The failure response object containing the child items originalRequestConfig
object The configuration object passed when making the request - Source:
-
onChildRequestSuccess(response, originalRequestConfig)
-
This is the success callback from the getChildren function and iterates over the results calling the updateChild function for each child. Once the data has been processed the Deferred object included in the original request configuration is resolved to indicate to the original caller that the results are available.
Parameters:
Name Type Description response
object The successful response object containing the child items originalRequestConfig
object The configuration object passed when making the request - Source:
-
updateChild(parent, child, index)
-
This is called from the onChildRequestSuccess function URL prefix that can also be configured.
Type:
- string
- Since:
- 1.0.39
- Default Value:
- null
- Source: