Class ecm.widget.viewer.AjaxViewer


Extends ecm.widget.viewer.DocViewer.
Provides a widget that supports page-by-page viewing of documents.

Note: Although methods on this widget indicate that it can support annotations display and editing, annotations viewing and editing are not currently supported.
Defined in: <ecm\widget\viewer\AjaxViewer.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
 
Sets up the full page frame.
 
Constructs the toolbar.
 
Determines if the viewer can open the item on the current client and mid-tier platforms.
 
Returns true if the document can be printed.
 
Closes the item.
 
 
Darkens the current page.
 
displayDocument(docUrl, docName, contentType, serverType)
Causes the viewer to display the given document.
 
Invoked to update the displayed page after loading a document or performing an action on the document.
 
dull()
Reduces contrast on the current page.
 
Handles the first page onClick event.
 
getPageInfo(pageNo)
Creates a page info object.
 
Returns the page number of the current page that is being viewed.
 
Handles the page selection event.
 
Inverts the current page.
 
Determines if the viewer contains unsaved changes.
 
Determines if the viewer is printing the document.
 
Handles the last page onClick event.
 
Lightens the current page.
 
Handles the next page onClick event.
 
Event method that is invoked when an annotation is selected
 
Event method that is invoked when a page is selected (that is, when the user clicks on the page rather than clicking on an annotation).
 
Handle resize of the top level DOM node, resizing the page area to fit.
 
Handles the previous page onClick event.
 
Launches the print preview window.
 
Handles page reload.
 
Retrieves the page count of the document from the server.
 
Retrieves viewing services information about the document from the server.
 
Handles the onClick event to rotate the page 180 degrees.
 
Handles rotate left onClick event
 
Handles rotate right onClick event
 
save()
Handle save.
 
saveAnnotations(callback)
Saves all annotation changes, if annotation editing is supported.
 
setItem(id, pageNumber)
 
Increases contrast on the current page
 
showItem(callback)
Displays the item, if an item has been set on this viewer.
 
Repopulates the page drop-down with new page values.
 
Updates the scale according to the current scale selection
 
Update toolbar tool state (enable, disable, selected, selected item) according to current state of document being viewed.
 
zoomCustom(zoom)
Handles the zoom customer selection event.
 
Handles the zoomIn onClick event.
 
Handles the zoomOut onClick event.
Methods borrowed from class ecm.widget.viewer.DocViewer:
delegateToDownload, getItem, getNativeViewer, ignoreDirty, isAppletViewer, isIframeViewer, isLoaded, isLoading, isLocked, isPluginViewer, onDirty, onDocumentLoaded, onFallback, onLoad, onViewerFocusOut, setIsLoading, unloadIframe

Constructor Detail

ecm.widget.viewer.AjaxViewer()

Method Detail

buildPageFrame()

Sets up the full page frame. Because the HTML template already constructed the DOM objects for it, only some resizing is needed.
Deprecated:
As of 2.0.2. This method will be made private.

buildToolbar()

Constructs the toolbar.
Deprecated:
As of 2.0.2. This method will be made private.

{Boolean} canOpenItem(item)

Determines if the viewer can open the item on the current client and mid-tier platforms. If IBM Content Navigator is deployed on Linux for System z, and the document is an office document type, this method will return false.
Parameters:
item
The item to test.
Returns:
{Boolean} A value of true or false, indicating whether this viewer can open the specified item.

canPrint()

Returns true if the document can be printed.

closeItem()

Closes the item. Terminates display of the document in the viewer, and clears any states related to the item that is assigned to this viewer.

constructor()


darken()

Darkens the current page.

displayDocument(docUrl, docName, contentType, serverType)

Causes the viewer to display the given document.
Parameters:
docUrl
docName
contentType
serverType
Deprecated:
As of 2.0.2. Use setItem and showItem.

displayPage()

Invoked to update the displayed page after loading a document or performing an action on the document.
Deprecated:
As of 2.0.2. This method will be made private.

dull()

Reduces contrast on the current page.

firstPage()

Handles the first page onClick event.

getPageInfo(pageNo)

Creates a page info object.
Parameters:
pageNo
Deprecated:
As of 2.0.2. This method will be made private.

{number} getPageNumber()

Returns the page number of the current page that is being viewed.
Returns:
{number} A number that represents the current page being viewed.

gotoPage(i)

Handles the page selection event.
Parameters:
i
The selected page number.

invert()

Inverts the current page.

{Boolean} isDirty()

Determines if the viewer contains unsaved changes.
Returns:
{Boolean} A value of true or false, if annotations have been added, modified, or deleted.

{Boolean} isPrinting()

Determines if the viewer is printing the document.
Returns:
{Boolean} A value of true or false, if the viewer is in the process of printing a document.

lastPage()

Handles the last page onClick event.

lighten()

Lightens the current page.

nextPage()

Handles the next page onClick event.

onAnnotationSelected()

Event method that is invoked when an annotation is selected

onPageSelected()

Event method that is invoked when a page is selected (that is, when the user clicks on the page rather than clicking on an annotation).

onresize()

Handle resize of the top level DOM node, resizing the page area to fit.
Deprecated:
As of 2.0.2. This method will be made private.

previousPage()

Handles the previous page onClick event.

print()

Launches the print preview window.

reload()

Handles page reload.

retrievePageCount()

Retrieves the page count of the document from the server. Once the page count is returned, update the toolbar.
Deprecated:
As of 2.0.2. This method will be made private.

retrieveViewServicesInfo()

Retrieves viewing services information about the document from the server. When the information is returned, update the toolbar.
Deprecated:
As of 2.0.2. This method will be made private.

rotate180()

Handles the onClick event to rotate the page 180 degrees.

rotateLeft()

Handles rotate left onClick event

rotateRight()

Handles rotate right onClick event

save()

Handle save.
Deprecated:
As of 2.0.2. Use saveAnnotations.

saveAnnotations(callback)

Saves all annotation changes, if annotation editing is supported.
Parameters:
callback
If specified, call the callback upon completion of the save.

setItem(id, pageNumber)

Parameters:
id
pageNumber

sharpen()

Increases contrast on the current page

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)

updatePageSelect()

Repopulates the page drop-down with new page values.
Deprecated:
As of 2.0.2. This method will be made private.

updateScaleFromSelection()

Updates the scale according to the current scale selection
Deprecated:
As of 2.0.2. This method will be made private.

updateToolStates()

Update toolbar tool state (enable, disable, selected, selected item) according to current state of document being viewed.
Deprecated:
As of 2.0.2. This method will be made private.

zoomCustom(zoom)

Handles the zoom customer selection event.
Parameters:
zoom
The zoom selection, which is a value between 1 and 11. Each value represents a specific zoom percentage or mode as listed: 1=25%, 2=50%, 3=75%, 4=100%, 5=150%, 6=200%, 7=300%, 8=400%, 9=Fit width, 10=Fit height, 11=Fit page.

zoomIn()

Handles the zoomIn onClick event.

zoomOut()

Handles the zoomOut onClick event.