Description
Class added v2.0.
dojo.require("esri.dijit.editing.AttachmentEditor");Widget that supports viewing attachments for feature layers that have attachments enabled. If the feature layers are from a feature service then the attachment editor will include the ability to create, view and delete attachments.
Samples
Search for
samples that use this class.
Class hierarchy
esri.dijit.editing.AttachmentEditor
Constructor
Methods
Constructor Detail
esri.dijit.editing.AttachmentEditor(params, srcNodeRef)
Creates a new AttachmentEditor object.
Parameters:
|
<Object>
params |
Required |
No parameter options.
|
|
<String>
srcNodeRef |
Required |
HTML element where the widget is rendered.
|
Code snippets:
map.infoWindow.setContent("<div id='content' style='width:100%'></div>");
map.infoWindow.resize(350,275);
attachmentEditor = new esri.dijit.editing.AttachmentEditor({}, dojo.byId("content"));
attachmentEditor.startup();
Methods Detail
showAttachments(graphic, featureLayer)
Display the attachment editor.
Return value: none
Input Parameters:
|
<Graphic> graphic |
Required |
Graphic, with attachments, to display in the attachment editor. |
|
<FeatureLayer> featureLayer |
Required |
The feature layer to display attachments for. The feature layer must have attachments enabled. |
Code snippets:
dojo.connect(featureLayer, "onClick", function(evt) {
//display the attachment editor in the map's info window.
attachmentEditor.showAttachments(evt.graphic,featureLayer);
map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
});
Finalizes the creation of the attachment editor. Call startup() after creating the widget when you are ready for user interaction.
Return value: none