Options
All
  • Public
  • Public/Protected
  • All
Menu

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

availableViews

availableViews: ViewDescriptor[]

children

children: Dialog[] = []

description

description: string

dialogClassName

dialogClassName: string

dialogMode

dialogMode: DialogMode

domainClassName

domainClassName: string

header

header: View

id

id: string

recordDef

recordDef: RecordDef

recordId

recordId: string

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 = 128 * 1024

Accessors

Private buffer

  • Get the current buffered record

    Returns RecordBuffer

catavolt

error

  • Return the error associated with this dialog, if any

    Returns DialogException

hasError

  • get hasError(): boolean
  • Returns whether or not this dialog loaded properly

    Returns boolean

isDestroyed

  • get isDestroyed(): boolean
  • Returns whether or not this Form is destroyed

    Returns boolean

isReadMode

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

    Returns boolean

isRefreshNeeded

  • get isRefreshNeeded(): boolean
  • Returns whether or not the data in this dialog is out of date

    Returns boolean

isWriteMode

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

    Returns boolean

lastRefreshTime

  • get lastRefreshTime(): Date
  • set lastRefreshTime(time: Date): void
  • Get the last time this dialog's data was refreshed

    Returns Date

  • Get the last time this dialog's data was refreshed

    Parameters

    • time: Date

    Returns void

menu

  • Get the all Menu's associated with this dialog

    Returns Menu

paneTitle

  • get paneTitle(): string
  • Get the title of this dialog

    Returns string

record

  • Get the associated entity record

    Returns Record

recordNow

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

    Returns Record

viewDescs

Methods

changeViewMode

destroy

  • destroy(): Promise<void>
  • Returns Promise<void>

findMenuAt

  • findMenuAt(actionId: string): Menu
  • Find a menu def on this dialog with the given actionId

    Parameters

    • actionId: string

    Returns Menu

formatForRead

  • formatForRead(prop: Property, propName: string): string
  • Get a string representation of this property suitable for 'reading'

    Parameters

    Returns string

formatForWrite

  • formatForWrite(prop: Property, propName: string): string
  • Get a string representation of this property suitable for 'writing'

    Parameters

    Returns string

getAvailableValues

  • getAvailableValues(propName: string): Promise<any[]>
  • Parameters

    • propName: string

    Returns Promise<any[]>

Protected getProperty

Private getWriteableRecord

  • Parameters

    Returns Record

Private initBuffer

  • initBuffer(record: Record): void
  • Parameters

    Returns void

initialize

Protected invokeMenuAction

  • Perform this action associated with the given Menu on this dialog. The targets array is expected to be an array of object ids.

    Parameters

    Returns Promise<Redirection>

    | Redirection>}

Protected invokeMenuActionWithId

isBinary

  • Returns whether or not this cell definition contains a binary value

    Parameters

    Returns boolean

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<Redirection>

    | Redirection>}

performMenuActionWithId

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

    • actionId: string
    • pendingWrites: Record

    Returns Promise<Redirection>

processSideEffects

  • processSideEffects(propertyName: string, value: any): Promise<void>
  • Properties whose PropertyDef.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 EditorDialog.getAvailableValues. When a value is selected, other properties' available values may change. (i.e. Country, State, City dropdowns)

    Parameters

    • propertyName: string
    • value: any

    Returns Promise<void>

propDefAtName

  • Get the property definition for a property name

    Parameters

    • propName: string

    Returns PropertyDef

read

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

    Returns Promise<Record>

readLargeProperties

  • readLargeProperties(recordId: string): Promise<LargeProperty[]>

readLargeProperty

  • readLargeProperty(propertyName: string, recordId?: string): Promise<LargeProperty>
  • Read a large property into memory

    Parameters

    • propertyName: string
    • Optional recordId: string

    Returns Promise<LargeProperty>

setLargePropertyWithDataUrl

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

setLargePropertyWithEncodedData

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

    Parameters

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

    Returns void

setPropertyValue

  • setPropertyValue(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

streamLargeProperty

  • Stream the encoded chunks of a large property without retaining them The streamConsumer will receive Base64 encoded chunks with callbacks. hasMore will be false with the final chunk.

    Parameters

    • streamConsumer: StreamConsumer
    • propertyName: string
    • Optional recordId: string

    Returns Promise<LargeProperty>

Protected updateSettingsWithNewDialogProperties

  • updateSettingsWithNewDialogProperties(referringObject: ReferringObject): void

write

  • Write this record (i.e. Record} back to the server

    Returns Promise<Record | Redirection>

Protected writeAttachment

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

Protected writeAttachments

  • writeAttachments(record: Record): Promise<void[]>

Protected writeLargeProperties

  • writeLargeProperties(record: Record): Promise<void[]>

Protected writeLargeProperty

  • writeLargeProperty(propertyName: string, largeProperty: LargeProperty): Promise<void>

Static loadLargeProperty

  • loadLargeProperty(getPropertyFn: function, streamConsumer?: StreamConsumer, propertyName?: string, recordId?: string): Promise<LargeProperty>

Generated using TypeDoc