Interface CreateObjectPageBindings

Component bindings to configure a page viewer for creating a new object.

interface CreateObjectPageBindings {
    bindingsType: CreateObject;
    containerClass?: string;
    docType: string;
    enableSheets?: boolean;
    eventName: CREATE;
    fitToContainerHeight?: boolean;
    initialCreateData?: Record<string, any>;
    onChange?: ((change: PageDataChange | PageModeChange) => void);
    onDirty?: ((isDirty: boolean) => void);
    pageClass?: string;
    pageModel?: PageModel;
    setApi?: ((api: PageViewerApi) => void);
    showToolbar?: boolean;
    tempCreateId?: string;
}

Hierarchy (view full)

Properties

bindingsType: CreateObject
containerClass?: string

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

docType: string

Entity type of the object.

enableSheets?: boolean

Enable workspace and insight tabs to be rendered.

eventName: CREATE

Page context to use.

fitToContainerHeight?: boolean

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

initialCreateData?: Record<string, any>

Initial values to populate the pageModel data.

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

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

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

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

pageClass?: string

Assign the given CSS classes to the page viewer's main section. This is the element which 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 pageModel data will be populated with initialCreateData. 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 to be 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 which is called when the page viewer is initialized. It provides an API which 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.

tempCreateId?: string

Temporary ID to use for the unsaved object.