Class ecm.widget.dialog.AddContentItemDialog


Extends ecm.widget.dialog.BaseDialog.
Provides a dialog box that is used to add documents or folders to a repository. Users can use this dialog box to specify all required parameters for adding documents or folders.
Defined in: <ecm\widget\dialog\AddContentItemDialog.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Field Summary

Field Attributes Field Name and Description
 
When the parentFolder is assigned, this boolean option overrides the default behavior for whether or not the user is allowed to browse for a different folder.
 
Destroy this dialog when the entire add operation has finished or the add dialog has been cancelled.
 
An instance of the parent folder ecm.model.ContentItem for this add.
 
An instance of ecm.model.Repository representing the repository that is selected for this add.
 
A boolean value that indicates whether to show the name of the entry template when there's only one entry template available.
 
A boolean value that indicates whether or not file input selection should be limited to a single document only under HTML5 browsers.
Fields borrowed from class ecm.widget.dialog.BaseDialog:
expandable, fitContentArea, lockFullscreen

Method Summary

Method Attributes Method Name and Description
 
addFolderInMemory(folderProperties)
This event is called by the add dialog when processing the add for a virtual folder (virtualItems is true).
 
applyEntryTemplate(renderProperties)
Updates the add dialog using the currently selected entry template settings.
 
Cleans up the widget.
 
Get the Daeja content
 
Return the Daeja content file name
 
 
Return the redaction content file name
 
Return true if Daeja content is set
 
Return true if redaction content is set
 
isValid(onSaveStatus)
Tests if the current settings in the add dialog are valid.
 
The Add button event handler.
 
onAddFailed(response)
This event is fired when the add operation has failed.
 
This event is fired when the entire add operation has completed or the add dialog has been cancelled.
 
The add dialog cancel event handler.
 
 
setDaejaContent(daejaContent, daejaPartFileName)
Set the Daeja content and file name
 
setDaejaPartFileName(daejaPartFileName)
Set the Daeja content file name
 
setDefaultContentClass(defaultContentClass)
Sets a particular content class as the default content class for the add dialog.
 
setFiles(files)
Sets the list of document files for the add.
 
setRedactionContent(redactionContent, redactionPartFileName)
Set redaction content and file name
 
setShowWarnings(message)
 
show(repository, parentFolder, typeDocument, virtualItems, callback, teamspace, useTemplate, entryTemplate, showMultiRepoFolderSelector, repositoryTypes, repositoryDocumentMode, virtualItemObjects)
Displays the Add dialog for adding documents and folders.
 
showUsingTemplateItem(repository, parentFolder, typeDocument, virtualItems, callback, teamspace, selectedItem)
Displays the Add dialog for adding documents and folders using an entry template.
Methods borrowed from class ecm.widget.dialog.BaseDialog:
addButton, appendSecondaryMessage, buildRendering, clearMessage, clearSecondaryMessage, hide, isMaximized, onDragOver, resize, setExpandable, setIntroText, setIntroTextRef, setMaximized, setMessage, setReferenceLink, setResizable, setSize, setSizeToViewportRatio, setTitle, setWidth, showActionBar

Constructor Detail

ecm.widget.dialog.AddContentItemDialog()

Field Detail

allowBrowseParentFolder

When the parentFolder is assigned, this boolean option overrides the default behavior for whether or not the user is allowed to browse for a different folder. When this option is not set, the default behavior is the user is only allowed to browse for a different folder if no parentFolder is set or if the parentFolder is the root folder.

destroyWhenFinished

Destroy this dialog when the entire add operation has finished or the add dialog has been cancelled.
Since:
2.0.3.7

parentFolder

An instance of the parent folder ecm.model.ContentItem for this add.

repository

An instance of ecm.model.Repository representing the repository that is selected for this add. stored.

showEntryTemplateName

A boolean value that indicates whether to show the name of the entry template when there's only one entry template available.
Since:
3.0.6

singleDocumentSelect

A boolean value that indicates whether or not file input selection should be limited to a single document only under HTML5 browsers.
Since:
2.0.3.7

Method Detail

addFolderInMemory(folderProperties)

This event is called by the add dialog when processing the add for a virtual folder (virtualItems is true). A virtual folder is not created by the add dialog; instead, the folder properties are stored by the addFolderInMemory event listener for creating the folder at another time.
Parameters:
folderProperties
An object that contains the following properties:
  • folderName - Name of the folder (string)
  • docid - Parent folder doc Id (string)
  • criterias - Folder property values
  • childComponentValues - Folder child component values
  • documentType - Content class Id (string)

applyEntryTemplate(renderProperties)

Updates the add dialog using the currently selected entry template settings.
Parameters:
renderProperties
A boolean value indicating whether a call should be made to render the property table widget

destroy()

Cleans up the widget.

getDaejaContent()

Get the Daeja content
Since:
3.0.1

getDaejaPartFileName()

Return the Daeja content file name
Since:
3.0.1

getExternalContentFilename()


getRedactionPartFileName()

Return the redaction content file name
Deprecated:
3.0.1 Use getDaejaPartFileName() instead.

hasDaejaContent()

Return true if Daeja content is set
Since:
3.0.1

hasRedactionContent()

Return true if redaction content is set
Deprecated:
3.0.1 Use hasDaejaContent() instead.

{Boolean} isValid(onSaveStatus)

Tests if the current settings in the add dialog are valid.
Parameters:
onSaveStatus
Since:
2.0.3 A boolean value. If true, changes are being saved and focus will be directed to the first invalid setting.
Returns:
{Boolean} A value of true if the current settings in the add dialog are valid, otherwise false.

onAdd()

The Add button event handler.

onAddFailed(response)

This event is fired when the add operation has failed.
Parameters:
response

onAddFinished()

This event is fired when the entire add operation has completed or the add dialog has been cancelled.

onCancel()

The add dialog cancel event handler.

postCreate()


setDaejaContent(daejaContent, daejaPartFileName)

Set the Daeja content and file name
Parameters:
daejaContent
daejaPartFileName
Since:
3.0.1

setDaejaPartFileName(daejaPartFileName)

Set the Daeja content file name
Parameters:
daejaPartFileName
Since:
3.0.1

setDefaultContentClass(defaultContentClass)

Sets a particular content class as the default content class for the add dialog. This is not required, but if needed must be called prior to calling one of the add dialog show methods.
Parameters:
defaultContentClass
The value can be the content class id string or ecm.model.ContentClass object.

setFiles(files)

Sets the list of document files for the add. This is not required, but if needed must be called prior to calling one of the add dialog show methods.
Parameters:
files
A W3C File API FileList that contains one or more File objects. Some examples of sources for a FileList include a drag and drop event or the input file control.

setRedactionContent(redactionContent, redactionPartFileName)

Set redaction content and file name
Parameters:
redactionContent
redactionPartFileName
Deprecated:
3.0.1 Use setDaejaContent() instead.

setShowWarnings(message)

Parameters:
message

show(repository, parentFolder, typeDocument, virtualItems, callback, teamspace, useTemplate, entryTemplate, showMultiRepoFolderSelector, repositoryTypes, repositoryDocumentMode, virtualItemObjects)

Displays the Add dialog for adding documents and folders.
Parameters:
repository
The ecm.model.Repository for the add. May be overridden by entry template settings.
parentFolder
The parent folder for added items. May be overridden by entry template settings. This may be a ecm.model.ContentItem, ecm.model.WorkItem or ecm.model.Repository.
typeDocument
A boolean value indicating if a document (true) or folder (false) is being added.
virtualItems
A boolean value indicating that the content item should not be created in the repository. The new item is still passed to the callback method when the Add dialog is closed. This is used to define folders in teamspace templates that are not created until a teamspace instance is created from the teamspace template.
callback
A function that is called after a content item is created. The new content item is passed to the callback method.
teamspace
The ecm.model.Teamspace for the add if working within a teamspace.
useTemplate
A boolean value indicating if the entry template passed in the entryTemplate parameter should be applied (true) when the add dialog is opened.
entryTemplate
The value can either be an ecm.model.EntryTemplate object that should be applied immediately (useTemplate is true), or an array of ecm.model.EntryTemplate objects that are presented for the user to choose from. If an entry template is not already retrieved then it is retrieved when it is applied to the add dialog.
showMultiRepoFolderSelector
A boolean value indicating if the folder selector that supports choosing a folder from a repository other than the current repository should be used (true).
repositoryTypes
A comma separated string containing the list of repository types. Not required if only using dialog in P8 (Since 2.0.3). Must set showMultiRepoFolderSelector parameter to true.
repositoryDocumentMode
A boolean value indicating if the dialog should render in repository document content type mode.
virtualItemObjects
An array of ecm.model.ContentItem that will be added from some repository.
Since:
2.0.3.6

showUsingTemplateItem(repository, parentFolder, typeDocument, virtualItems, callback, teamspace, selectedItem)

Displays the Add dialog for adding documents and folders using an entry template.
Parameters:
repository
The ecm.model.Repository for the add. Can be overridden by the entry template settings.
parentFolder
The ecm.model.ContentItem parent folder for added items. Can be overridden by the entry template settings.
typeDocument
A boolean value indicating if a document (true) or folder (false) is being added. This will be overridden by the entry template setting.
virtualItems
A boolean value indicating that the content item should not be created in the repository. The new item is still passed to the callback method when the Add dialog is closed. This is used to define folders in teamspace templates that are not created until a teamspace instance is created from the teamspace template.
callback
A function that is called after a content item is created. The new content item is passed to the callback method.
teamspace
The ecm.model.Teamspace for the add if working within a teamspace.
selectedItem
The ecm.model.ContentItem for the entry template. If the content item is not an entry template then the add proceeds with no entry template. The ecm.model.EntryTemplate object for the entry template content item is retrieved before the add dialog is displayed.