Class ecm.widget.viewer.IframeDocViewer


Extends ecm.widget.viewer.DocViewer.
Provides a base implementation for all iframe-based document viewers. This class can be used standalone, in conjunction with the launch URL as defined in the ecm.model.Viewer object, to implement URL-based viewers.
Defined in: <ecm\widget\viewer\IframeDocViewer.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Fields borrowed from class ecm.widget.viewer.DocViewer:
docViewerClass, item, preview, showErrorOnFallback, startingPage, viewerDef

Method Summary

Method Attributes Method Name and Description
 
 
Determines if the viewer is Applet-based, by looking for applet elements in the DOM loaded into the contained iframe.
 
Determines if the viewer is iframe-based.
 
Determines if the document has completed loading.
 
Determines if the current document is in the process of being loaded.
 
setItem(item, pageNumber)
Assigns an item to this viewer.
 
showItem(callback)
Displays the item, if an item has been set on this viewer.
 
Sets the iframe src value for this viewer to about:blank, unloading it.
Methods borrowed from class ecm.widget.viewer.DocViewer:
canOpenItem, delegateToDownload, getItem, getNativeViewer, getPageNumber, ignoreDirty, isDirty, isLocked, isPluginViewer, isPrinting, onDirty, onDocumentLoaded, onFallback, onLoad, onViewerFocusOut, saveAnnotations, setIsLoading

Constructor Detail

ecm.widget.viewer.IframeDocViewer()

Method Detail

closeItem()


isAppletViewer()

Determines if the viewer is Applet-based, by looking for applet elements in the DOM loaded into the contained iframe.
Returns:
(Boolean) A value of true or false, if the viewer is Applet-based.

isIframeViewer()

Determines if the viewer is iframe-based. Because IframeDocViewer is iframe-based, this method returns true.
Returns:
(Boolean) True.

isLoaded()

Determines if the document has completed loading.
Returns:
(Boolean) A value of true or false, if loading and display of the document has completed.

isLoading()

Determines if the current document is in the process of being loaded.
Returns:
(Boolean) A value of true or false, if the document is in the process of loading into the viewer.

setItem(item, pageNumber)

Assigns an item to this viewer. This call is not required to display the document (item) in the user interface. The parameters are the viewerItem to view, and the page number to start on. If unspecified, the page number to start on is assumed to be page 1.
Parameters:
item
The item that is being assigned to this viewer.
pageNumber
For document viewers that support page control, the page number to start on. If not specified, page 1 is assumed. (optional)

showItem(callback)

Displays the item, if an item has been set on this viewer. The callback will be called on successful completion of showing the item.
Parameters:
callback
The callback to call on successful completion of this call. (optional)

unloadIframe()

Sets the iframe src value for this viewer to about:blank, unloading it.