Packagecom.esri.ags.components
Classpublic class AttachmentInspector
InheritanceAttachmentInspector Inheritance spark.components.supportClasses.SkinnableComponent

Since : ArcGIS API for Flex 2.0

Attachment inspector allows users to see the attachments for a feature as well as adding new attachments.

See also

com.esri.ags.layers.FeatureLayer
Live Sample - AttachmentInspector.


Public Properties
 PropertyDefined By
  addEnabled : Boolean
If true, allows adding attachments.
AttachmentInspector
  attachmentInfos : IList
List of AttachmentInfo instances.
AttachmentInspector
  attachmentName : String
The selected attachment name after browse and select.
AttachmentInspector
  attachmentSize : Number
The selected attachment size after browse and select.
AttachmentInspector
  deleteEnabled : Boolean
If true, allows deleting attachments.
AttachmentInspector
  feature : Graphic
Reference to the active feature.
AttachmentInspector
  featureLayer : FeatureLayer
[read-only] Reference to active feature layer.
AttachmentInspector
  infoWindowLabel : String
Set the label on the info window.
AttachmentInspector
Public Methods
 MethodDefined By
  
Creates a new AttachmentInspector.
AttachmentInspector
  
clear():void
Clear the inspector.
AttachmentInspector
  
refresh():void
Refreshes the AttachmentInspector.
AttachmentInspector
  
showAttachments(feature:Graphic, featureLayer:FeatureLayer = null):void
Show the feature attachments.
AttachmentInspector
Events
 Event Summary Defined By
  Fires after adding an attachment.AttachmentInspector
  Fires after deleting an attachment.AttachmentInspector
  Fires after failing to add an attachment, deleting an attachment or querying attachments.AttachmentInspector
  Fires it cannot load selected file to upload.AttachmentInspector
  Fires after querying attachment infos.AttachmentInspector
  Fires after apply edits result.AttachmentInspector
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
addButton:spark.components.supportClasses.ButtonBase
Required: false Part Type: Static
An optional skin part for the add button.
AttachmentInspector
  
browseButton:spark.components.supportClasses.ButtonBase
Required: false Part Type: Static
An optional skin part for the browse button.
AttachmentInspector
  
cancelButton:spark.components.supportClasses.ButtonBase
Required: false Part Type: Static
An optional skin part for the cancel button.
AttachmentInspector
Skin States

To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.


 Skin State Description Defined By
  
attachmentLoaded
Attachment loaded after browse state. AttachmentInspector
  
attachmentLoadedNoAttachmentsInList
Attachment loaded after browse but no attachment in list state. AttachmentInspector
  
disabled
The disabled state of the AttachmentInspector component. AttachmentInspector
  
noAttachmentsInList
No attachments in list state. AttachmentInspector
  
normal
The default (i.e., "normal ") state of the AttachmentInspector component. AttachmentInspector
  
queryAttachmentInfos
Querying attachments. AttachmentInspector
  
queryAttachmentInfosWithList
Querying attachments with list AttachmentInspector
Property Detail
addEnabledproperty
addEnabled:Boolean

Since : ArcGIS API for Flex 2.3

If true, allows adding attachments.

The default value is true.

This property can be used as the source for data binding.


Implementation
    public function get addEnabled():Boolean
    public function set addEnabled(value:Boolean):void
attachmentInfosproperty 
attachmentInfos:IList

List of AttachmentInfo instances.

This property can be used as the source for data binding.


Implementation
    public function get attachmentInfos():IList
    public function set attachmentInfos(value:IList):void
attachmentNameproperty 
attachmentName:String

The selected attachment name after browse and select.

This property can be used as the source for data binding.


Implementation
    public function get attachmentName():String
    public function set attachmentName(value:String):void
attachmentSizeproperty 
attachmentSize:Number

The selected attachment size after browse and select.

This property can be used as the source for data binding.


Implementation
    public function get attachmentSize():Number
    public function set attachmentSize(value:Number):void
deleteEnabledproperty 
deleteEnabled:Boolean

Since : ArcGIS API for Flex 2.1

If true, allows deleting attachments.

The default value is true.

This property can be used as the source for data binding.


Implementation
    public function get deleteEnabled():Boolean
    public function set deleteEnabled(value:Boolean):void
featureproperty 
feature:Graphic

Reference to the active feature.

This property can be used as the source for data binding.


Implementation
    public function get feature():Graphic
    public function set feature(value:Graphic):void
featureLayerproperty 
featureLayer:FeatureLayer  [read-only]

Reference to active feature layer.

This property can be used as the source for data binding.


Implementation
    public function get featureLayer():FeatureLayer
infoWindowLabelproperty 
infoWindowLabel:String

Since : ArcGIS API for Flex 2.3

Set the label on the info window.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get infoWindowLabel():String
    public function set infoWindowLabel(value:String):void
Constructor Detail
AttachmentInspector()Constructor
public function AttachmentInspector()

Creates a new AttachmentInspector.

Method Detail
clear()method
public function clear():void

Clear the inspector.

Here we reset all the attachment information like the name and size, the attachment info list is emptied and the skin state is reset back to 'normal'.

refresh()method 
public function refresh():void

Refreshes the AttachmentInspector. This is same as invoking showAttachments but with the privately held reference to the feature and feature layer.

showAttachments()method 
public function showAttachments(feature:Graphic, featureLayer:FeatureLayer = null):void

Show the feature attachments. If the attchments are successfully loaded, then an EDITS_COMPLETE handler is attached to the feature layer to listen for deleted feature. If one of the deleted features is the shown feature, then the inspector is cleared.

Parameters

feature:Graphic — The feature to show its attachments.
 
featureLayer:FeatureLayer (default = null) — Optional feature layer reference.

Event Detail
addAttachmentComplete Event
Event Object Type: com.esri.ags.events.AttachmentEvent
AttachmentEvent.type property = com.esri.ags.events.AttachmentEvent

Fires after adding an attachment.

deleteAttachmentsComplete Event  
Event Object Type: com.esri.ags.events.AttachmentEvent
AttachmentEvent.type property = com.esri.ags.events.AttachmentEvent

Fires after deleting an attachment.

fault Event  
Event Object Type: mx.rpc.events.FaultEvent
FaultEvent.type property = mx.rpc.events.FaultEvent.FAULT

Fires after failing to add an attachment, deleting an attachment or querying attachments. Check fault code, string or detail for more information.

ioError Event  
Event Object Type: flash.events.IOErrorEvent
IOErrorEvent.type property = flash.events.IOErrorEvent.IO_ERROR

Fires it cannot load selected file to upload.

queryAttachmentInfosComplete Event  
Event Object Type: com.esri.ags.events.AttachmentEvent
AttachmentEvent.type property = com.esri.ags.events.AttachmentEvent

Fires after querying attachment infos.

result Event  
Event Object Type: mx.rpc.events.ResultEvent
ResultEvent.type property = mx.rpc.events.ResultEvent.RESULT
Deprecated Since 2.4 - Use event types defined in AttachmentEvent. This event will not be dispatched, it is there for compiler warning generation.

Fires after apply edits result.