AttachmentsViewModel

require(["esri/widgets/Attachments/AttachmentsViewModel"], function(AttachmentsViewModel) { /* code goes here */ });
Class: esri/widgets/Attachments/AttachmentsViewModel
Inheritance: AttachmentsViewModel Accessor
Since: ArcGIS API for JavaScript 4.15

Provides the logic for the Attachments widget.

See also:

Constructors

new AttachmentsViewModel(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
AttachmentInfo

The current AttachmentInfo being edited.

more details
more detailsAttachmentsViewModel
AttachmentInfo[]

A collection of AttachmentInfo defined on a feature.

more details
more detailsAttachmentsViewModel
String

The name of the class.

more details
more detailsAccessor
Graphic

The graphic for the attachments.

more details
more detailsAttachmentsViewModel
String

The current mode performed by the user.

more details
more detailsAttachmentsViewModel
String

The current state of the widget.

more details
more detailsAttachmentsViewModel
Boolean

Defines whether or not the feature supports resizing attachments.

more details
more detailsAttachmentsViewModel

Property Details

activeAttachmentInfo AttachmentInfo

The current AttachmentInfo being edited.

See also:
attachmentInfos AttachmentInfo[]readonly

A collection of AttachmentInfo defined on a feature.

See also:
declaredClass Stringreadonly inherited

The name of the class. The declared class name is formatted as esri.folder.className.

graphic Graphic

The graphic for the attachments.

mode String

The current mode performed by the user.

Possible Values:"view"|"add"|"edit"

Default Value:"view"
state Stringreadonly

The current state of the widget.

Possible Values:"ready"|"disabled"|"loading"

Default Value:"ready"
supportsResizeAttachments Boolean

Defines whether or not the feature supports resizing attachments. This depends on whether the feature layer's capabilities.operations.supportsResizeAttachments is set to true.

Method Overview

NameReturn TypeSummaryClass
Promise<AttachmentInfo[]>

Queries for the attachments on a feature.

more details
more detailsAttachmentsViewModel

Method Details

getAttachments(){Promise<AttachmentInfo[]>}

Queries for the attachments on a feature. Attachments for multiple features can be queried if the layer's capabilities.operations.supportsQueryAttachments is true.

Returns:
TypeDescription
Promise<AttachmentInfo[]>When resolved, returns the AttachmentInfo of the queried feature.
See also:

API Reference search results

NameTypeModule
Loading...