Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EditorDialog

PanContext Subtype that represents an 'Editor Dialog'. An 'Editor' represents and is backed by a single Record and Record definition. See Record and RecordDef.

Hierarchy

Index

Properties

Private _buffer

_buffer: RecordBuffer

Private _isFirstReadComplete

_isFirstReadComplete: boolean

Protected _parentDialog

_parentDialog: any

availableViews

availableViews: Array<ViewDescriptor>

businessClassName

businessClassName: string

businessId

businessId: string

children

children: Array<Dialog> = []

description

description: string

dialogClassName

dialogClassName: string

dialogMode

dialogMode: DialogMode

header

header: View

id

id: string

recordDef

recordDef: RecordDef

referringObject

referringObject: ReferringObject

selectedViewId

selectedViewId: string

sessionId

sessionId: string

tenantId

tenantId: string

type

view

view: View

viewMode

viewMode: ViewMode

Static BINARY_CHUNK_SIZE

BINARY_CHUNK_SIZE: number = 256 * 1024

Accessors

buffer

catavolt

error

hasError

  • get hasError(): boolean

isDestroyed

  • get isDestroyed(): boolean

isFirstReadComplete

  • get isFirstReadComplete(): boolean
  • Returns whether or not the buffers contain valid data via a successful read operation.

    Returns boolean

isReadMode

  • get isReadMode(): boolean
  • Returns whether or not this Editor is in 'read' mode

    Returns boolean

isRefreshNeeded

  • get isRefreshNeeded(): boolean

isWriteMode

  • get isWriteMode(): boolean
  • Returns whether or not this property is 'writable'

    Returns boolean

lastRefreshTime

  • get lastRefreshTime(): Date
  • set lastRefreshTime(time: Date): void

menu

paneTitle

  • get paneTitle(): string

parentDialog

record

recordNow

  • Get the current version of the entity record, with any pending changes present

    Returns Record

viewDescs

Methods

binaryAt

  • binaryAt(propName: string, record: Record): Promise<Binary>

changeViewMode

destroy

  • destroy(): void

findMenuAt

  • findMenuAt(actionId: string): Menu

formatForRead

  • formatForRead(prop: Property, propName: string): string

formatForWrite

  • formatForWrite(prop: Property, propName: string): string

getAvailableValues

  • getAvailableValues(propName: string): Promise<Array<Object>>
  • Get the possible values for a 'constrained value' property

    Parameters

    • propName: string

    Returns Promise<Array<Object>>

Private initBuffer

  • initBuffer(record: Record): void

initialize

Protected invokeMenuAction

Protected invokeMenuActionWithId

isBinary

isReadModeFor

  • isReadModeFor(propName: string): boolean
  • Returns whether or not this property is read-only

    Parameters

    • propName: string

    Returns boolean

isSignature

  • Returns whether or not this cell definition contains a binary value that should be treated as a signature control

    Parameters

    Returns boolean

openView

openViewWithId

  • openViewWithId(viewId: string): Promise<Dialog>

parseValue

  • parseValue(formattedValue: any, propName: string): any
  • Parses a value to prepare for 'writing' back to the server

    Parameters

    • formattedValue: any
    • propName: string

    Returns any

performMenuAction

  • Perform the action associated with the given Menu on this EditorDialog Given that the Editor could possibly be destroyed as a result of this action, any provided pending writes will be saved if present.

    Parameters

    Returns Promise<object | Redirection>

    | Redirection>}

performMenuActionWithId

  • performMenuActionWithId(actionId: string, pendingWrites: Record): Promise<object | Redirection>

processSideEffects

  • processSideEffects(propertyName: string, value: any): Promise<void>
  • Properties whose {@link PropDef.canCauseSideEffects} value is true, may change other underlying values in the model. This method will update those underlying values, given the property name that is changing, and the new value. This is frequently used with {@link EditorContext.getAvailableValues}. When a value is seleted, other properties available values may change. (i.e. Country, State, City dropdowns)

    Parameters

    • propertyName: string
    • value: any

    Returns Promise<void>

propDefAtName

read

  • Read (load) the Record assocated with this Editor The record must be read at least once to initialize the Context

    Returns Promise<Record>

readBinaries

Protected readBinary

  • readBinary(propName: string, record: Record): Promise<Binary>

Private removeSpecialProps

setBinaryPropWithDataUrl

  • setBinaryPropWithDataUrl(name: string, dataUrl: string): void

setBinaryPropWithEncodedData

  • setBinaryPropWithEncodedData(name: string, encodedData: string, mimeType: string): void
  • Set a binary property with base64 encoded data

    Parameters

    • name: string
    • encodedData: string
    • mimeType: string

    Returns void

setPropValue

  • setPropValue(name: string, value: any): any
  • Set the value of a property in this Record. Values may be already constructed target types (CodeRef, TimeValue, Date, etc.) or primitives, in which case the values will be parsed and objects constructed as necessary.

    Parameters

    • name: string
    • value: any

    Returns any

Protected updateSettingsWithNewDialogProperties

  • updateSettingsWithNewDialogProperties(referringObject: ReferringObject): void

write

writeAttachment

  • writeAttachment(attachment: Attachment): Promise<void>

writeAttachments

  • writeAttachments(record: Record): Promise<Array<void>>

writeBinaries

  • writeBinaries(record: Record): Promise<Array<void>>

Generated using TypeDoc