Class ecm.widget.viewer.ContentViewer


Extends dijit._LayoutWidget.
Provides a widget that contains tabs in which individual viewers for documents are displayed.
Defined in: <ecm\widget\viewer\ContentViewer.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Field Summary

Field Attributes Field Name and Description
 
The browser's locale.
 
The content viewer title.
 
Specifies whether the ContentViewer widget is the primary layout widget in a browser window.
 
Specifies whether the ContentViewer widget is the sole widget in a browser window.
 
Specifies whether the ContentViewer widget is the sub window.
 
Specifies whether to create tabs that are closable or not.
 
Specifies whether to load the "Tabs" context menu actions
 
Sets to true to prevent iframe-based viewers from having their page set to about:blank externally.
 
Specifies whether to display the Edit properties pane's toolbar
 
Shows the layout toolbar buttons, which include tabbed view, horizontal split, vertical split, or edit properties.
 
Shows the Next and Previous toolbar buttons.
 
Indicates the current splitMode value of the viewer.
 
Indicates the current viewerMode value of the viewer.
 
The title of the window, when isEntireWindow == true.
 
Specifies whether the tab controller is wrapped or scrolling

Method Summary

Method Attributes Method Name and Description
 
close(item)
 
Close all open viewers, without confirming to save or discard changes.
 
closeItem(item, okCallback, cancelCallback, preview, confirm)
Close the item, if open in a viewer or preview viewer.
 
 
enablePI(show)
Enables the edit properties mode in the viewer.
 
Returns the text to place to the left of the ContentViewer widget toolbar.
 
getViewersStatus(includePrinting)
Returns a data structure containing information about all open viewers that have unsaved changes, and/or are in the process of printing.
 
 
 
navigateNextHit(tabContainer, confirm)
Navigate to the next hit relative to the current selected viewer.
 
navigatePreviousHit(tabContainer, confirm)
Navigate to the previous hit relative to the current selected viewer.
 
 
onDocumentClosed(item, preview)
Called when an item is closed in the viewer.
 
onDocumentOpened(item, preview)
Called when an item is opened in the viewer.
 
 
onNextEnabled(tabContainer, enabled)
Event is fired when the next hit button for the tab container should be either enabled or disabled.
 
onPrevEnabled(tabContainer, enabled)
Event is fired when the previous hit button for the tab container should be either enabled or disabled.
 
 
open(item, openInBackground, pageNumber)
Opens an item in the viewer, if it is not already opened.
 
openInMergeSplit(item, openInBackground)
Opens an item in Merge and Split mode, if it is not already opened.
 
 
preview(item, openInBackground)
Previews an item in the viewer, if it is not already opened.
 
For the specified page, determine the availability of next and previous documents relative to the current document being displayed.
 
showMessage(message)
Show a message.
 
 

Constructor Detail

ecm.widget.viewer.ContentViewer()

Field Detail

browserLocale

The browser's locale.

contentViewerTitle

The content viewer title. If specified, this text will be placed to the left of the top toolbar of this widget. If it is null, the text will be assigned by the widget, to a predefined localized value.
Since:
2.0.3

isChildWindow

Specifies whether the ContentViewer widget is the primary layout widget in a browser window. If true, the ecm.model.desktop object for the window will be created and loaded.

isEntireWindow

Specifies whether the ContentViewer widget is the sole widget in a browser window.

isSubWindow

Specifies whether the ContentViewer widget is the sub window.

isTabClosable

Specifies whether to create tabs that are closable or not. Used in case where only one document is opened into viewer.

loadTabContextMenu

Specifies whether to load the "Tabs" context menu actions

resetAboutBlank

Sets to true to prevent iframe-based viewers from having their page set to about:blank externally.

showEditPropertiesToolbar

Specifies whether to display the Edit properties pane's toolbar

showLayouts

Shows the layout toolbar buttons, which include tabbed view, horizontal split, vertical split, or edit properties.

showNextPrev

Shows the Next and Previous toolbar buttons.

splitMode

Indicates the current splitMode value of the viewer. The possible values are: none, left, right, and bottom.

viewerMode

Indicates the current viewerMode value of the viewer. The possible values are: none, left, right, bottom, edit and comment.
Since:
2.0.3.3

windowTitle

The title of the window, when isEntireWindow == true.

wrappingTabController

Specifies whether the tab controller is wrapped or scrolling

Method Detail

close(item)

Parameters:
item
Deprecated:
As of release 2.0.2. This method is not implemented.

closeAllViewers()

Close all open viewers, without confirming to save or discard changes. Any changes, or print jobs underway may be interrupted.
Since:
2.0.3.3

closeItem(item, okCallback, cancelCallback, preview, confirm)

Close the item, if open in a viewer or preview viewer.
Parameters:
item
The item to close.
okCallback
Called if the item is found and it's tab(s) are closed.
cancelCallback
Called if the item was either not found, or the close was cancelled by the user.
preview
True or false, to indicate whether or not to close an item opened via the open call or via the preview call. Default is false.
confirm
True or false, to indicate whether or not to show a confirmation dialog if the viewer contains unsaved changes or is in the middle of spooling a print. Default is false.
Since:
2.0.3.4

constructor()


enablePI(show)

Enables the edit properties mode in the viewer.
Parameters:
{boolean} show Optional, Default: true

getContentViewerTitle(viewer)

Returns the text to place to the left of the ContentViewer widget toolbar.
Parameters:
viewer
Since:
2.0.3

{object} getViewersStatus(includePrinting)

Returns a data structure containing information about all open viewers that have unsaved changes, and/or are in the process of printing. The returned data structure:

 {
	  splitMode: one of "none", "left", "right" or "bottom", indicating the position of the split pane relative to the main pane
	  viewerMode: one of "none", "left", "right" "bottom", "edit", or "comment", indicating the current mode of the viewer
	  mainStatus: an array containing 0..n status objects
	  [ 
		  {
			  title:			 the title as it appears on the viewer's tab
			  tabIndex:		  the tab index of the dirty and/or printing tab
			  id:				the item id of the item being viewed
			  repositoryId:	  the repository id of the item being viewed
			  isDirty:		   boolean indicating that the item is dirty 
			  isPropertiesDirty: boolean indicating that properties pane is open and contains unsaved changes
			  isCommentsDirty:   boolean indicating that comments pane is open and contains unsaved changes
			  isPrinting:		boolean indicating that the item is printing 
			  isPreview:		 boolean indicating that this tab represents a preview viewer
		  }
		  ...
	  ],
	  splitStatus: an array containing 0..n status objects, or null if splitMode == "none".
	  [
		  ...
	  ]
 }
Parameters:
includePrinting
(optional) Indicate whether or not to include viewers that are printing. If true, all viewers that are either printing or dirty are returned. If false (default), return only dirty viewers.
Returns:
{object} An object following the data structure described above.

isMergeSplitModeEnabled()


isMergeSplitModeInScopeForItems(items)

Parameters:
items

navigateNextHit(tabContainer, confirm)

Navigate to the next hit relative to the current selected viewer.
Parameters:
tabContainer
The tab container (main or split) containing the specified viewer to navigate. If not specified, the current focused tabContainer will be used.
confirm
If true (default), and there are unsaved annotations in the viewer, confirmation dialog will be shown prior to navigating to the next item.
Since:
2.0.3.3

navigatePreviousHit(tabContainer, confirm)

Navigate to the previous hit relative to the current selected viewer.
Parameters:
tabContainer
The tab container (main or split) containing the specified viewer to navigate. If not specified, the current focused tabContainer will be used.
confirm
If true (default), and there are unsaved annotations in the viewer, confirmation dialog will be shown prior to navigating to the previous item.
Since:
2.0.3.3

notifyOnOriginalItemChange(item)

Parameters:
item

onDocumentClosed(item, preview)

Called when an item is closed in the viewer.
Parameters:
item
the item that was opened
preview
boolean indicating if closed from preview mode
Since:
2.0.3.3

onDocumentOpened(item, preview)

Called when an item is opened in the viewer.
Parameters:
item
the item that was opened
preview
boolean indicating if opened in preview mode
Since:
2.0.3.3

onNext()


onNextEnabled(tabContainer, enabled)

Event is fired when the next hit button for the tab container should be either enabled or disabled.
Parameters:
tabContainer
The tabContainer associated with this state update.
enabled
Boolean to enable or disable
Since:
2.0.3.3

onPrevEnabled(tabContainer, enabled)

Event is fired when the previous hit button for the tab container should be either enabled or disabled.
Parameters:
tabContainer
The tabContainer associated with this state update.
enabled
Boolean to enable or disable
Since:
2.0.3.3

onPrevious()


open(item, openInBackground, pageNumber)

Opens an item in the viewer, if it is not already opened. If openInBackground is false, the viewer will be selected into the foreground and displayed. In split mode, the tab is selected in the current focused split.
Parameters:
item
The item to view.
openInBackground
pageNumber
the page to be viewed when the item is opened

openInMergeSplit(item, openInBackground)

Opens an item in Merge and Split mode, if it is not already opened. If openInBackground is false, the viewer will be selected into the foreground and displayed. In split mode, the tab is selected in the current focused split.
Parameters:
item
The item to view.
openInBackground

postMixInProperties()


preview(item, openInBackground)

Previews an item in the viewer, if it is not already opened. If openInBackground is false, the viewer will be selected into the foreground and displayed. In split mode, the tab is selected in the current focused split.
Parameters:
item
The item to view.
openInBackground

refreshNavigation(tabPage)

For the specified page, determine the availability of next and previous documents relative to the current document being displayed. Calling this method will cause onNextEnabled and onPrevEnabled events to fire, to update navigation controls.
Parameters:
tabPage
The tabPage containing the document being viewed
Since:
2.0.3.3

showMessage(message)

Show a message.
Parameters:
message
An instance of ecm.model.Message.
Since:
3.0.1

showMessageDialog(message)

Parameters:
message

toggleMergeSplitMode(event)

Parameters:
event