DocumentViewer

To get an instance of the DocumentViewer, call makeViewerUI(E, options) on your Document store instance.

var instance = P.exampleDocStore.instance(M);
var ui = instance.makeViewerUI(E, {
    // options
    showVersions: true,
    showCurrent: true
});

Options

property version

Version number to display.

Specify which version to build the UI for.

property showVersions

Boolean. True allows the user to select from which version of the forms they want to view.

property showCurrent

Boolean. True allows the user to see the current version of the forms.

property hideFormNavigation

Boolean. True hides the interform links from the viewer generated sidebar.

property uncommittedChangesWarningText

String. Specify the warning text to display when viewing current uncommitted document. Set to a falsey value to disable the warning.

property style

Specify the style to be used by the viewer. The default (unspecified) style shows all of the forms in a document concatenated on one page. Possible styles:

Style Description
"tabs" Shows only one form at a time, rendering tabs in the UI for switching between the different forms

Interfaces

property hasDocumentToDisplay

Returns a boolean, specifying whether the viewer has a document to display.

property documentHTML

Returns the UI for the DocumentViewer as a HTML string.

property deferredDocument

Returns the UI for the DocumentViewer as a Deferred render object for use in HSVT templates.

property sidebarHTML

Return the UI for the sidebar (links to the different forms/pages, and other versions of the form) as a HTML string.