Class ecm.widget.search.SearchSelector


Extends dijit._WidgetBase.
Provides a widget that contains a tree or drop-down list that is used to select a search template. This widget displays the available search templates that are available to the user. If the search templates are in folders, this widget allows users to traverse the folders to find and select a particular template.
Defined in: <ecm\widget\search\SearchSelector.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Field Summary

Field Attributes Field Name and Description
 
A boolean flag to enable context menus.
 
A function that will be passed to Tree widget.
 
label 
A string holding the label of the drop-down list.
 
Boolean to allow multiple selection of classes.
 
If true then double clicking an item selects it and closes the dropdown.
 
 
A string holding the style, "tree" or "dropdown", of this widget.
 
If true then cross repository searches will be shown in the search selector.
 
A boolean flag to show opened searches.
 
 
A boolean flag to create a button to launch ecm.widget.search.SearchBuilder widget in the toolbar.
 
A boolean flag to enable a button to launch ecm.widget.search.SearchBuilder widget and a text box to filter searches.

Method Summary

Method Attributes Method Name and Description
 
Clears the selected node in the list.
 
 
Creates the tree model.
 
Gets the repository of this widget.
 
Returns the currently selected Search Template.
 
Callback when an item is double clicked.
 
Event that is fired when a user drags an external document into the widget (i.e.
 
 
 
 
Event fired when the new search button is clicked.
 
Event fired when the new unified search button is clicked.
 
onRecentSearchesLoad(recentSearches)
Called whenever recent searches are loaded.
 
onSearchTemplateSelected(searchTemplate)
Event fired when a search template is selected.
 
onTreeReload(searchTemplates)
Event fired when the tree is reloaded.
 
Resizes itself to fit inside its container if the toolbar is enabled.
 
setDisabled(disabled)
Sets the disabled attribute of the dropdown control that contains the class tree.
 
setLabel(label)
Sets the label of the dropdown control.
 
setRepository(repository, teamspace)
Sets the repository and teamspace objects to use for filtering the list.
 
setSelected(searchTemplate)
Sets the currently selected SearchTemplate.
 
setStyle(style)
Sets the style of the selector.

Constructor Detail

ecm.widget.search.SearchSelector()

Field Detail

enableCtxMenu

A boolean flag to enable context menus.

getIconClass

A function that will be passed to Tree widget.

label

A string holding the label of the drop-down list.

multiSelect

Boolean to allow multiple selection of classes.

onDblClickSelectAndClose

If true then double clicking an item selects it and closes the dropdown.

repository

A ecm.model.Repository object.

selectorStyle

A string holding the style, "tree" or "dropdown", of this widget.

showCrossRepositorySearches

If true then cross repository searches will be shown in the search selector.
Since:
2.0.3

showOpenedSearches

A boolean flag to show opened searches.

showRecents

Deprecated:
As of release 2.0.1.

toolbarContainsNewSearchButton

A boolean flag to create a button to launch ecm.widget.search.SearchBuilder widget in the toolbar. Works in conjunction with toolbarEnabled. If true the new search button appears in the toolbar otherwise it is hidden.
Since:
2.0.2

toolbarEnabled

A boolean flag to enable a button to launch ecm.widget.search.SearchBuilder widget and a text box to filter searches.

Method Detail

clearSelection()

Clears the selected node in the list.

constructor()


createTreeModel()

Creates the tree model.
Returns:
Instance of ecm.model.SearchTemplateTreeModel.

{@link ecm.model.Repository} getRepository()

Gets the repository of this widget.
Deprecated:
As of release 2.0.2. Use repository directly, e.g., searchSelector.repository.
Returns:
{@link ecm.model.Repository}

getSelected()

Returns the currently selected Search Template. If multiple select is enabled, then an array of Search Templates is returned.
Returns:
An ecm.model.SearchTemplate object representing the selected item. If multiple select is enabled, then an array of ecm.model.SearchTemplate objects is returned.

onDoubleClickSelected(item)

Callback when an item is double clicked. This is not called if the double click results in the item being selected and the dropdown being closed (usually when onDblClickSelectAndClose is true).
Parameters:
item

onExternalDragEnter(evt)

Event that is fired when a user drags an external document into the widget (i.e., the document is entering the widget).
Parameters:
evt
The event.

onExternalDragExit(evt)

Parameters:
evt

onExternalDragOver(evt)

Parameters:
evt

onExternalDrop(evt)

Parameters:
evt

onNewSearchButtonClick()

Event fired when the new search button is clicked.

onNewUnifiedSearchButtonClick()

Event fired when the new unified search button is clicked.

onRecentSearchesLoad(recentSearches)

Called whenever recent searches are loaded.
Parameters:
recentSearches
An array of recent searches loaded
Since:
2.0.2

onSearchTemplateSelected(searchTemplate)

Event fired when a search template is selected.
Parameters:
searchTemplate
A selected ecm.model.SearchTemplate object

onTreeReload(searchTemplates)

Event fired when the tree is reloaded.
Parameters:
searchTemplates

resize()

Resizes itself to fit inside its container if the toolbar is enabled.

setDisabled(disabled)

Sets the disabled attribute of the dropdown control that contains the class tree.
Parameters:
disabled
Specify true to disable the dropdown control. Specify false to enable it.

setLabel(label)

Sets the label of the dropdown control. Only valid for the dropdown style.
Parameters:
label
The label to set.

setRepository(repository, teamspace)

Sets the repository and teamspace objects to use for filtering the list.
Parameters:
repository
A ecm.model.Repository object
teamspace
A ecm.model.Teamspace object

setSelected(searchTemplate)

Sets the currently selected SearchTemplate.
Parameters:
searchTemplate
A string that is set to the id of the SearchTemplate to select, or an ecm.model.SearchTemplate object representing the Search Template to select.

setStyle(style)

Sets the style of the selector. There are two supported styles: "tree" and "dropdown".
Parameters:
style
A string holding the style of this widget