Interface EditObjectPageBindings

Component bindings to configure a page viewer for editing an existing object.

interface EditObjectPageBindings {
    bindingsType: EditObject;
    containerClass?: string;
    docId: string;
    docType: string;
    enableSheets?: boolean;
    eventName: EDIT;
    fitToContainerHeight?: boolean;
    onChange?: ((change: PageDataChange | PageModeChange) => void);
    onDirty?: ((isDirty: boolean) => void);
    pageClass?: string;
    pageModel?: PageModel;
    setApi?: ((api: PageViewerApi) => void);
    showToolbar?: boolean;
    templateUuid?: string;
}

Hierarchy (view full)

Properties

bindingsType: EditObject
containerClass?: string

Assign the given CSS classes to the page viewer's container. This element encompasses the main document view and the toolbar.

docId: string

Object ID

docType: string

Entity type of the object.

enableSheets?: boolean

Enable the workspace and insight tabs to be rendered.

eventName: EDIT

Page context to use.

fitToContainerHeight?: boolean

If true, the page viewer will fill its parent element's height.

onChange?: ((change: PageDataChange | PageModeChange) => void)

A callback that is called when the pageModel's mode or data changes.

onDirty?: ((isDirty: boolean) => void)

A callback that is called when the page viewer dirty state changes.

pageClass?: string

Assign the given CSS classes to the page viewer's main section. This element displays the main document, excluding toolbar.

pageModel?: PageModel

Optionally provide a pageModel using window.sas.vi.pageModel.createFromObject. The pageModel type must match docType. The docType and docId are used to fetch the document page, and pageModel.data is set using the field values from this response. The pageModel can be used to inspect current data and validity, but the reference to this model will be broken if a new template is loaded due to a mode transition or other condition. Prefer using setApi and onChange to interact with the page.

setApi?: ((api: PageViewerApi) => void)

A callback that is called when the page viewer is initialized. It provides an API that can be used to check the page viewer state and save the document.

showToolbar?: boolean

Show the page toolbar. This contains the toolbar actions associated with the object's entity type.

templateUuid?: string

Use the given page template by UUID regardless of page context.