Select to view content in your preferred language

Catching AttachmentInspector Events

590
2
02-07-2011 05:57 AM
EddieJesinsky
Deactivated User
I am trying to listen for events while using AttachmentInspector:

1) When an attachment has finished being added/uploaded
2) When an attachment has been deleted

Unless I am mistaken, the AttachmentInspector does not seem to dispatch AttachmentEvents like using featureLayer.addAttachment() would. I managed to find a reference to the (undocumented by the way) com.esri.ags.components.supportClasses.AttachmentRemoveEvent which lets me catch when an attachment has been deleted, but I still need something to let me know when one has been added.

My reason for this post is that I would prefer to use the AttachmentInspector over coming up with my own method for adding attachments.

Thanks!
Tags (2)
0 Kudos
2 Replies
DasaPaddock
Esri Regular Contributor
The AttachmentInspector is calling the attachment methods on the associated FeatureLayer so you can listen for the FeatureLayer's attachment events:
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html#eventSummary
0 Kudos
EddieJesinsky
Deactivated User
Thank you, it appears I was not listening for the event correctly.
0 Kudos