Class ecm.widget.ContentClassSelector
Extends
dijit._Widget.
Provides a widget that contains a tree or drop-down list that is used to select the class for a document
or folder.
Defined in: <ecm\widget\ContentClassSelector.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
If true then when the widget is created, the first item in the list is selected by default.
|
|
An array of strings containing the id of any classes to be filtered out of the class list.
|
|
For IBM Content Manager Enterprise Edition, a boolean to control whether classes are filtered based on
classification.
|
|
For Content Manager, a boolean to control whether classes are filtered based on hierarchical item types.
|
|
Only for Content Manager, specifies a class to filter by classification.
|
|
A String used to filter the classes displayed.
|
|
For Content Manager, if true then a pseudo class called
All is automatically added to the
class list. |
|
An array of class ids, if specified then only those classes are displayed in the class selector.
|
|
Contains the label displayed in the drop down control.
|
|
Boolean to allow multiple selection of classes.
|
|
IBM FileNet P8 only.
|
|
If
true then double clicking an item selects it and closes the dropdown. |
|
If set to
true , then only classes that allow instances can be selected (FileNet P8 only). |
|
A list of class ids related to FileNet P8 Forms that are not to be displayed.
|
|
Content class of the root object (cmis only).
|
|
String containing the id of the root class.
|
|
A ecm.model.ContentClass object representing the currently selected class.
|
|
A String specifying the class selector style, either
tree or dropdown . |
|
If
true then the Include subclasses check box is displayed. |
|
A ecm.model.Teamspace object to associate with the class selector.
|
|
For Content Manager, a boolean to control whether classes are filtered based on whether the class is for
documents only.
|
|
For Content Manager, a boolean to control whether classes are filtered based on whether the class is for
folders only.
|
|
For Content Manager, a boolean to control whether classes are filtered based on whether the class stores
content.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
Clears the current selected class and clears the label.
|
|
destroy()
Cleans up any objects that were created.
|
|
FileNet P8 only.
|
|
getRepository(repository)
Gets the repository.
|
|
Returns the current root class used.
|
|
Returns the currently selected class.
|
|
Returns whether only classes that are for documents are visible.
|
|
Returns whether only classes that are for folders are visible.
|
|
Returns whether only classes that store content are visible.
|
|
If the Include subclasses check box is displayed, this returns the check box checked state.
|
|
isItemAvailable(contentClass)
Returns
true if the specified class can be selected. |
|
onContentClassSelected(item, incSubclasses)
Callback when a class has been selected.
|
|
onDoubleClickSelected(item)
Callback when an item is double clicked.
|
|
onLoaded()
Callback when the tree widget is loaded.
|
|
onSelected(item)
Callback when an item is selected.
|
|
setDisabled(disabled)
Sets the
disabled attribute of the dropdown control that contains the class tree. |
|
setExcludedItems(excludedItems)
Allows a list of classes to be filtered out of the class selector.
|
|
setFilterHierarchicalItemTypes(filterHierarchicalItemTypes)
Sets whether hierarchical item types are to be filtered out of the class selector.
|
|
setIncludeSubclasses(includeSubclasses)
Sets the
checked attribute of the Include subclasses check box. |
|
setInitialSelection(contentClass)
Selects the initial selected class.
|
|
setLabel(label)
Sets the label of the dropdown control.
|
|
setObjectStore(objectStore)
FileNet P8 only.
|
|
setRepository(repository, reload)
Sets the repository.
|
|
setRootClass(rootClass, skipRendering)
Sets the root class to be used by the class tree.
|
|
setRootClassId(rootClassId, skipRendering)
Sets the root class to be used by the class tree.
|
|
setSelected(contentClass)
Sets the currently selected class.
|
|
setShowIncludeSubclasses(showIncludeSubclasses)
Sets whether an option to include subclasses is shown.
|
|
setStyle(style)
Sets the style of the class selector.
|
|
setVisibleOnlyForDocument(visibleOnlyForDocument)
Sets whether only classes that are for documents are visible.
|
|
setVisibleOnlyForFolder(visibleOnlyForFolder)
Sets whether only classes that are for folders are visible.
|
|
setVisibleOnlyIfStoresContent(visibleOnlyIfStoresContent)
Sets whether only classes that store content are visible.
|
|
Refreshes the styles for each row in the tree.
|
Field Detail
defaultToFirstItem
If true then when the widget is created, the first item in the list is selected by default.
excludedItems
An array of strings containing the id of any classes to be filtered out of the class list.
filterByClassification
For IBM Content Manager Enterprise Edition, a boolean to control whether classes are filtered based on
classification.
filterHierarchicalItemTypes
For Content Manager, a boolean to control whether classes are filtered based on hierarchical item types.
filterTemplateName
Only for Content Manager, specifies a class to filter by classification.
filterType
A String used to filter the classes displayed.
hasAll
For Content Manager, if true then a pseudo class called
All
is automatically added to the
class list.
itemList
An array of class ids, if specified then only those classes are displayed in the class selector.
label
Contains the label displayed in the drop down control.
multiSelect
Boolean to allow multiple selection of classes.
objectStore
IBM FileNet P8 only. Used when the class selector uses a class that is from a FileNet P8 object store that is
different from the active repository. This is an object valued property where the object store information is
stored in the properties
id
, symbolicName
, and displayName
.
onDblClickSelectAndClose
If
true
then double clicking an item selects it and closes the dropdown.
onlySelectable
If set to
true
, then only classes that allow instances can be selected (FileNet P8 only).
p8FormsExcludeList
A list of class ids related to FileNet P8 Forms that are not to be displayed. The FormTemplate class is
controlled by an Admin setting on the repository objects.
rootClass
Content class of the root object (cmis only).
rootClassId
String containing the id of the root class.
selectedContentClass
A ecm.model.ContentClass object representing the currently selected class.
selectorStyle
A String specifying the class selector style, either
tree
or dropdown
.
showIncludeSubclasses
If
true
then the Include subclasses check box is displayed.
teamspace
A ecm.model.Teamspace object to associate with the class selector.
visibleOnlyForDocument
For Content Manager, a boolean to control whether classes are filtered based on whether the class is for
documents only.
visibleOnlyForFolder
For Content Manager, a boolean to control whether classes are filtered based on whether the class is for
folders only.
visibleOnlyIfStoresContent
For Content Manager, a boolean to control whether classes are filtered based on whether the class stores
content.
Method Detail
clearSelection()
Clears the current selected class and clears the label.
destroy()
Cleans up any objects that were created.
getObjectStore()
FileNet P8 only. Returns a FileNet P8 object store that is used when the class selector uses a class that is
from a FileNet P8 object store that is different from the active repository. This is an object valued
property where the object store information is stored in the properties
id
,
symbolicName
, and displayName
.
- Returns:
- An object valued property where the object store information is stored in the properties id, symbolicName, and displayName.
getRepository(repository)
Gets the repository.
- Parameters:
- repository
- Returns:
- Returns a ecm.model.Repository object.
getRootClassId()
Returns the current root class used.
- Returns:
- The root class.
getSelected()
Returns the currently selected class. If multiple select is enabled, then an array of classes is returned.
- Returns:
- An ecm.model.ContentClass object representing the selected item. If multiple select is enabled, then an array of ecm.model.ContentClass objects is returned.
getVisibleOnlyForDocument()
Returns whether only classes that are for documents are visible. If
true
, and the class is
designated as for folders only, then it is not displayed. Only for Content Manager repositories.
- Returns:
- If
true
then classes designated as for folders only are not displayed.
getVisibleOnlyForFolder()
Returns whether only classes that are for folders are visible. If
true
, and the class is
designated as not for folders, then it is not displayed. Only for Content Manager repositories.
- Returns:
- If
true
then classes designated as not for folders are not displayed.
getVisibleOnlyIfStoresContent()
Returns whether only classes that store content are visible. Only for Content Manager repositories.
- Returns:
- If
true
then only classes that store content are visible.
isIncludeSubclasses()
If the Include subclasses check box is displayed, this returns the check box checked state.
Otherwise it returns
false
.
- Returns:
True
if the Include subclasses check box is checked,false
if not checked or it is not displayed.
isItemAvailable(contentClass)
Returns
true
if the specified class can be selected. Whether the class can be selected depends
on the settings for filterTemplateName
, visibleOnlyIfStoresContent
,
visibleOnlyForFolder
, visibleOnlyForDocument
, and onlySelectable
.
- Parameters:
- contentClass
- An ecm.model.ContentClass object.
onContentClassSelected(item, incSubclasses)
Callback when a class has been selected.
- Parameters:
- item
- A ecm.model.ContentClass object representing the selected class. If multiple select is enabled, then this is a array of ecm.model.ContentClass objects.
- incSubclasses
- A Boolean containing the
checked
state of the Include subclasses check box.
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
onLoaded()
Callback when the tree widget is loaded.
onSelected(item)
Callback when an item is selected.
- Parameters:
- item
postCreate()
setDisabled(disabled)
Sets the
disabled
attribute of the dropdown control that contains the class tree.
- Parameters:
- disabled
- Specify
true
to disable the dropdown control. Specifyfalse
to enable it.
setExcludedItems(excludedItems)
Allows a list of classes to be filtered out of the class selector. The specified classes will not be shown in
the class selector.
- Parameters:
- excludedItems
- An array of class ids to be excluded.
setFilterHierarchicalItemTypes(filterHierarchicalItemTypes)
Sets whether hierarchical item types are to be filtered out of the class selector. Only used for Content
Manager repositories.
- Parameters:
- filterHierarchicalItemTypes
- If
true
then hierarchical item types are not displayed.
setIncludeSubclasses(includeSubclasses)
Sets the
checked
attribute of the Include subclasses check box.
- Parameters:
- includeSubclasses
- Boolean specifying the
checked
attribute of the Include subclasses check box. If Include subclasses is not displayed, then this is ignored.
setInitialSelection(contentClass)
Selects the initial selected class. This should be called after the onLoaded event. The provided class is
selected even if it is not currently available in the tree model.
- Parameters:
- contentClass
- Since:
- 2.0.3.6
setLabel(label)
Sets the label of the dropdown control. Only valid for the
dropdown
style.
- Parameters:
- label
- The label to set.
setObjectStore(objectStore)
FileNet P8 only. Used when the class selector uses a class that is from a P8 object store that is different
from the active repository. This is an object valued property where the object store information is stored in
the properties
id
, symbolicName
, and displayName
.
- Parameters:
- objectStore
- An object valued property where the object store information is stored in the properties id, symbolicName, and displayName.
setRepository(repository, reload)
Sets the repository. Will cause the widget to be re-rendered.
- Parameters:
- repository
- A ecm.model.Repository object.
- reload
- A Boolean indicating whether to reload the model even if the repository is not changed
setRootClass(rootClass, skipRendering)
Sets the root class to be used by the class tree. Only used for cmis repositories.
- Parameters:
- rootClass
- The class to be used for the root class.
- skipRendering
- Boolean flag indicating whether to skip creating the rendering for this widget. (Since 2.0.3)
setRootClassId(rootClassId, skipRendering)
Sets the root class to be used by the class tree. Only used for FileNet P8 repositories.
- Parameters:
- rootClassId
- The class name to be used for the root class.
- skipRendering
- Boolean flag indicating whether to skip creating the rendering for this widget. (Since 2.0.3)
setSelected(contentClass)
Sets the currently selected class.
- Parameters:
- contentClass
- A string that is set to the id of the class to select, or an ecm.model.ContentClass object representing the class to select.
setShowIncludeSubclasses(showIncludeSubclasses)
Sets whether an option to include subclasses is shown. If
true
then a check box control is
displayed for the Include subclasses option. This is only valid for the "dropdown" style.
- Parameters:
- showIncludeSubclasses
- If true then the Include subclasses check box is displayed.
setStyle(style)
Sets the style of the class selector. Two styles are supported:
tree
, and
dropdown
. If tree
is specified then a Tree widget is rendered. If
dropdown
is specified then a dropdown control is created, clicking in the dropdown displays
the class selector in a tree control.
- Parameters:
- style
- Either
tree
ordropdown
.
setVisibleOnlyForDocument(visibleOnlyForDocument)
Sets whether only classes that are for documents are visible. If
true
, and the class is
designated as for folders only, then it is not displayed. Only for Content Manager repositories.
- Parameters:
- visibleOnlyForDocument
- If
true
then classes designated as for folders only are not displayed.
setVisibleOnlyForFolder(visibleOnlyForFolder)
Sets whether only classes that are for folders are visible. If
true
, and the class is
designated as not for folders, then it is not displayed. Only for Content Manager repositories.
- Parameters:
- visibleOnlyForFolder
- If
true
then classes designated as not for folders are not displayed.
setVisibleOnlyIfStoresContent(visibleOnlyIfStoresContent)
Sets whether only classes that store content are visible. Only for Content Manager repositories.
- Parameters:
- visibleOnlyIfStoresContent
- Specify
true
to only display classes that store content.
updateTreeRowStyles()
Refreshes the styles for each row in the tree.