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

Based on a string value, searches a map service exposed by the ArcGIS Server REST API (available in ArcGIS Server 9.3 and above). The search can be conducted on a single field of a single layer, on many fields of a layer, or on many fields of many layers.

Set the URL to the ArcGIS Server REST resource that represents a map service, for example, http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer. For more information on constructing a URL, see Using the ArcGIS Services Directory.

See also

com.esri.ags.tasks.supportClasses.FindResult
com.esri.ags.tasks.supportClasses.FindParameters
com.esri.ags.events.FindEvent
Live sample - Find features
Live sample - Zoom to found features
Find (Operation) in REST documentation


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
  executeLastResult : Array
[read-only] Array of FindResult object returned from last call to the execute function.
FindTask
 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
  
FindTask(url:String = null)
Creates a new FindTask object.
FindTask
  
execute(findParameters:FindParameters, responder:IResponder = null):AsyncToken
Sends a request to the ArcGIS REST map service resource to perform a search based on the FindParameters specified in the findParameters argument.
FindTask
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 execute operation successfully completes.FindTask
  Dispatched when a FindTask fails.FindTask
Property Detail
executeLastResultproperty
executeLastResult:Array  [read-only]

Array of FindResult object returned from last call to the execute function.

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


Implementation
    public function get executeLastResult():Array

See also

Constructor Detail
FindTask()Constructor
public function FindTask(url:String = null)

Creates a new FindTask object.

Parameters
url:String (default = null) — [optional] URL to the ArcGIS Server REST resource that represents a map service.
Method Detail
execute()method
public function execute(findParameters:FindParameters, responder:IResponder = null):AsyncToken

Sends a request to the ArcGIS REST map service resource to perform a search based on the FindParameters specified in the findParameters argument. On completion, the findComplete event is fired and the optional responder is called.

Parameters

findParameters:FindParameters — The criteria used to find the features.
 
responder:IResponder (default = null) — The responder to call on result or fault.

Returns
AsyncToken
Event Detail
executeComplete Event
Event Object Type: com.esri.ags.events.FindEvent
FindEvent.type property = com.esri.ags.events.FindEvent.EXECUTE_COMPLETE

Dispatched when execute operation successfully completes.

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

Dispatched when a FindTask fails.