This page describes an older version, please see latest API at http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/tasks/FeatureLayerTask.html.
Packagecom.esri.ags.tasks
Classpublic class FeatureLayerTask
InheritanceFeatureLayerTask Inheritance BaseTask Inheritance flash.events.EventDispatcher

Since : ArcGIS API for Flex 2.3

Performs edits on a layer in a feature service and updates a feature's attachments.



Public Properties
 PropertyDefined By
 InheritedautoNormalize : Boolean
If true, normalizes the geometries across the central meridian.
BaseTask
 Inheritedconcurrency : String
Value that indicates how to handle multiple calls to the same task.
BaseTask
 InheriteddisableClientCaching : Boolean
If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from being loaded from the browser's cache.
BaseTask
 Inheritedmethod : String
URL request method to use.
BaseTask
 InheritedproxyURL : String
The URL to proxy the request through.
BaseTask
 InheritedrequestTimeout : int
The request timeout in seconds.
BaseTask
 InheritedshowBusyCursor : Boolean
If true, a busy cursor is displayed while a service is executing.
BaseTask
 Inheritedtoken : String
Token for accessing a secure task.
BaseTask
 Inheritedurl : String
URL of the task.
BaseTask
Public Methods
 MethodDefined By
  
FeatureLayerTask(url:String = null)
Creates a new FeatureLayerTask object.
FeatureLayerTask
  
addAttachment(objectId:Number, data:ByteArray, name:String, contentType:String = null, responder:IResponder = null):AsyncToken
Add attachment to a feature (using its ObjectID).
FeatureLayerTask
  
applyEdits(adds:Array, updates:Array, deletes:Array, objectIdField:String, responder:IResponder = null):AsyncToken
Saves edits on the server.
FeatureLayerTask
  
deleteAttachments(objectId:Number, attachmentIds:Array, responder:IResponder = null):AsyncToken
Delete one or more attachments for a feature.
FeatureLayerTask
  
queryAttachmentInfos(objectId:Number, responder:IResponder = null):AsyncToken
Information about attachment(s) for a specific ObjectID.
FeatureLayerTask
Protected Methods
 MethodDefined By
 Inherited
sendURLVariables(urlSuffix:String, urlVariables:URLVariables, responder:IResponder, operation:Function):AsyncToken
Sends an HTTP request.
BaseTask
Events
 Event Summary Defined By
  Dispatched when an addAttachment operation successfully completes.FeatureLayerTask
  Dispatched when a deleteAttachments operation successfully completes.FeatureLayerTask
  Dispatched when an applyEdits operation successfully completes.FeatureLayerTask
  Dispatched when an operation fails.FeatureLayerTask
  Dispatched when a queryAttachmentInfos operation successfully completes.FeatureLayerTask
Constructor Detail
FeatureLayerTask()Constructor
public function FeatureLayerTask(url:String = null)

Creates a new FeatureLayerTask object.

Parameters
url:String (default = null) — URL to the ArcGIS Server REST resource that represents a layer in a feature service.
Method Detail
addAttachment()method
public function addAttachment(objectId:Number, data:ByteArray, name:String, contentType:String = null, responder:IResponder = null):AsyncToken

Add attachment to a feature (using its ObjectID).

Parameters

objectId:Number — The ObjectID.
 
data:ByteArray — The byte array of the attachment.
 
name:String — The name of the attachment
 
contentType:String (default = null) — If not set, the name is checked for one of (avi, csv, doc, docx, f4v, flv, gif, htm, html, jpeg, jpg, mov, mpeg, mpg, pdf, png, ppt, pptx, swf, tif, txt, xls, xlsx, xml, zip), and if no match is found, the contentType is set to application/octet-stream.
 
responder:IResponder (default = null) — The responder to call on result or fault. The result function will be given a FeatureEditResult instance.

Returns
AsyncToken

See also

applyEdits()method 
public function applyEdits(adds:Array, updates:Array, deletes:Array, objectIdField:String, responder:IResponder = null):AsyncToken

Saves edits on the server.

Parameters

adds:Array — Array of features to add to the layer in the feature service.
 
updates:Array — Array of features to modify. Must have valid objectId.
 
deletes:Array — Array of features to delete. Must have valid objectId.
 
objectIdField:String — Required if deletes is not empty.
 
responder:IResponder (default = null) — The responder to call on result or fault. The result function will be given a FeatureEditResults instance.

Returns
AsyncToken

See also

deleteAttachments()method 
public function deleteAttachments(objectId:Number, attachmentIds:Array, responder:IResponder = null):AsyncToken

Delete one or more attachments for a feature.

Parameters

objectId:Number — The ObjectID.
 
attachmentIds:Array — The array of attachment IDs.
 
responder:IResponder (default = null) — The responder to call on result or fault. The result function will be given an Array of FeatureEditResult instances.

Returns
AsyncToken

See also

queryAttachmentInfos()method 
public function queryAttachmentInfos(objectId:Number, responder:IResponder = null):AsyncToken

Information about attachment(s) for a specific ObjectID. Used to find out if a feature has attachments.

Parameters

objectId:Number — The ObjectID.
 
responder:IResponder (default = null) — The responder to call on result or fault. The result function will be given an Array of AttachmentInfo instances.

Returns
AsyncToken

See also

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

Dispatched when an addAttachment operation successfully completes.

Defines the value of the type property of the event object for a addAttachmentComplete event.
deleteAttachmentsComplete Event  
Event Object Type: com.esri.ags.events.AttachmentEvent
AttachmentEvent.type property = com.esri.ags.events.AttachmentEvent.DELETE_ATTACHMENTS_COMPLETE

Dispatched when a deleteAttachments operation successfully completes.

Defines the value of the type property of the event object for a deleteAttachmentsComplete event.
editsComplete Event  
Event Object Type: com.esri.ags.events.FeatureLayerEvent
FeatureLayerEvent.type property = com.esri.ags.events.FeatureLayerEvent.EDITS_COMPLETE

Dispatched when an applyEdits operation successfully completes.

Defines the value of the type property of the event object for a editsComplete event.
fault Event  
Event Object Type: mx.rpc.events.FaultEvent
FaultEvent.type property = mx.rpc.events.FaultEvent.FAULT

Dispatched when an operation fails.

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

Dispatched when a queryAttachmentInfos operation successfully completes.

Defines the value of the type property of the event object for a queryAttachmentInfosComplete event.