Class ecm.widget.FolderTree


Extends dijit._Widget.
Provides a widget that is used to browse the folders in a repository.
Defined in: <ecm\widget\FolderTree.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Field Summary

Field Attributes Field Name and Description
 
Default context menu type.
 
The dnd controller to pass into the dijit.Tree.
 
Boolean indicating listen for oncontextmenu.
 
Boolean indicating that drag-and-drop is enabled.
 
The filter type to pass into the FolderTreeModel widget.
 
Optional callback method used in getTreeRowClass method.
 
If the first node or children are teamspaces items, the root node is not displayed.
 
Boolean to pass into the dijit.Tree.
 
The root folder id.
 
An teamspace id to filter from the list of teamspaces.
 
Boolean indicating if the root should be selected after the tree is created.
 
Boolean indicating if the tree should show folders only.
 
Boolean indicating if the root should be shown.
 
 
Identify if the search in control is opened when building teamspace or templates.
 
The teamspace name to pass into the FolderTreeModel widget.
 
Base Text Direction to pass into the dijit.Tree.When it is set its value should be ltr,rtl or auto.
 

Method Summary

Method Attributes Method Name and Description
 
checkAcceptance(source, nodes)
Checks if the tree can accept nodes from this source.
 
checkItemAcceptance(target, source, position)
Checks if the tree can accept the item.
 
createTree(params)
Creates the tree.
 
 
getContextMenuType(targetNode)
Returns the context menu type for the input target node.
 
Returns the selected item in the tree.
 
Returns the tree model.
 
getTreeRowClass(item, opened)
Returns the tree row class for the input item.
 
Returns true if the path is selected.
 
onContextMenuCreated(actionMenu, items)
Event invoked when the context menus have been constructed.
 
Event called when an item is double-clicked.
 
onItemSelected(item, node)
Event called when a item is selected.
 
Event fired when next page is loaded.
 
onOpenItem(item, resultSet)
Event fired when open an item.
 
Event fired when processing is complete.
 
Event fired when processing is started.
 
Event fired after the tree is rendered.
 
 
Resizes the tree.
 
setFolder(folder)
Sets the root folder.
 
setRepository(repository, objectStore, rootFolderId)
Sets the repository.
 
setStyle(style)
Sets the style of the selector.
 
setTeamspace(repository, objectStore)
Sets the teamspace.
 
setWorkItem(workItem)
Sets the root work item.

Constructor Detail

ecm.widget.FolderTree()

Field Detail

contextMenuType

Default context menu type.

dndController

The dnd controller to pass into the dijit.Tree.

enableCtxMenu

Boolean indicating listen for oncontextmenu.

enableDnd

Boolean indicating that drag-and-drop is enabled.

filterType

The filter type to pass into the FolderTreeModel widget.

getRowClassCallback

Optional callback method used in getTreeRowClass method.

isFirstChildTeamspaces

If the first node or children are teamspaces items, the root node is not displayed.

persist

Boolean to pass into the dijit.Tree.

rootFolderId

The root folder id.

rootItemToFilter

An teamspace id to filter from the list of teamspaces.
Since:
2.0.3

selectRootInitially

Boolean indicating if the root should be selected after the tree is created.

showFoldersOnly

Boolean indicating if the tree should show folders only.

showRoot

Boolean indicating if the root should be shown.

teamspace


teamspacemode

Identify if the search in control is opened when building teamspace or templates.

teamspacename

The teamspace name to pass into the FolderTreeModel widget.

textDir

Base Text Direction to pass into the dijit.Tree.When it is set its value should be ltr,rtl or auto.

treeModel

or ecm.model.AttachmentTreeModel

Method Detail

{Boolean} checkAcceptance(source, nodes)

Checks if the tree can accept nodes from this source.
Parameters:
source
{dijit.tree._dndSource} The source which provides items.
nodes
Array of DOM nodes corresponding to nodes being dropped, dijitTreeRow nodes if source is a dijit.Tree.
Returns:
{Boolean} true if the tree can accept nodes.

{Boolean} checkItemAcceptance(target, source, position)

Checks if the tree can accept the item.
Parameters:
target
The target.
source
{dijit.tree._dndSource} The source which provides items.
position
Returns:
{Boolean} true if the tree target can accept nodes.

createTree(params)

Creates the tree.
Parameters:
params
The parameters used to create the tree

destroy()


getContextMenuType(targetNode)

Returns the context menu type for the input target node.
Parameters:
targetNode
The target node.
Returns:
The string context menu type.

getSelectedItem()

Returns the selected item in the tree.

{@link ecm.model.FolderTreeModel} getTreeModel()

Returns the tree model.
Returns:
{@link ecm.model.FolderTreeModel} or ecm.model.AttachmentTreeModel

getTreeRowClass(item, opened)

Returns the tree row class for the input item.
Parameters:
item
The item in the tree.
opened

isPathSelected(path)

Returns true if the path is selected.
Parameters:
path
The path.

onContextMenuCreated(actionMenu, items)

Event invoked when the context menus have been constructed. This is used to alter the menu items if necessary.
Parameters:
actionMenu
A ecm.widget.ActionMenu object.
items
The array of items selected.

onItemDblClick()

Event called when an item is double-clicked.

onItemSelected(item, node)

Event called when a item is selected.
Parameters:
item
The tree item selected.
node
The tree node selected.

onLoadedNextPage()

Event fired when next page is loaded.

onOpenItem(item, resultSet)

Event fired when open an item. Called by the context menu actions.
Parameters:
item
The item to open.
resultSet
A ecm.model.ResultSet object that contains the item's resultSet.

onProcessingComplete()

Event fired when processing is complete.

onProcessingStarted()

Event fired when processing is started.

onRendered()

Event fired after the tree is rendered.

postCreate()


resize()

Resizes the tree.

setFolder(folder)

Sets the root folder.
Parameters:
folder
A ecm.model.ContentItem object.

setRepository(repository, objectStore, rootFolderId)

Sets the repository.
Parameters:
repository
A ecm.model.Repository object.
objectStore
The object store name on the repository.
rootFolderId
The root folder Id to initialize this tree with after the repository changed.

setStyle(style)

Sets the style of the selector. Only "tree" is supported.
Parameters:
style

setTeamspace(repository, objectStore)

Sets the teamspace.
Parameters:
repository
An ecm.model.Teamspace object.
objectStore
The object store name on the repository.

setWorkItem(workItem)

Sets the root work item.
Parameters:
workItem
A ecm.model.WorkItem object.