com.esri.adf.web.faces.event
Class ClientActionArgs

java.lang.Object
  extended by com.esri.adf.web.faces.event.ClientActionArgs
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CircleArgs, DragImageArgs, DragRectangleArgs, OvalArgs, PointArgs, PolygonArgs, PolylineArgs

public abstract class ClientActionArgs
extends Object
implements Serializable

ClientActionArgs can be created for known client actions (on the map controls) such as adf.MapPoint, adf.MapLine, adf.MapOval etc. Concrete sub-classes of this class represent the actual client action arguments. They construct themselves by extracting the required parameters from the request. Below is a table of the client actions and their corresponding ClientActionArgs classes:

Client JavaScript Action     ClientActionArgs Class
ClientActions.MAP_POINT(adf.MapPoint) PointArgs
ClientActions.MAP_LINE(adf.MapLine) LineArgs
ClientActions.MAP_RECTANGLE(adf.MapRectangle) DragRectangleArgs
ClientActions.MAP_CIRCLE(adf.MapCircle) CircleArgs
ClientActions.MAP_OVAL(adf.MapOval) OvalArgs
ClientActions.MAP_POLYLINE(adf.MapPolyline) PolylineArgs
ClientActions.MAP_POLYGON(adf.MapPolygon) PolygonArgs
ClientActions.MAP_PAN(adf.MapPan) DragImageArgs

You can add to the table of client actions by calling the addClientActionArgs method.

See Also:
Serialized Form

Field Summary
protected  String controlId
           
protected  Map<?,?> requestParameters
          The associated request parameters.
 
Constructor Summary
ClientActionArgs()
           
 
Method Summary
static void addClientActionArgs(String clientAction, String argsClassName)
          Add a client action and ClientActionArgs class mapping.
static ClientActionArgs getClientActionArgs(String clientAction, Map<?,?> requestParameters, String controlId)
          Retrieves the ClientActionArgs responsible for the specified client action.
 String getControlId()
           
abstract  WebGeometry getMapGeometry()
           
 Map<?,?> getRequestParameters()
          Returns the request parameters for this client action.
abstract  WebGeometry getWebGeometry()
           
abstract  void init()
          Initialize the sub-class of ClientActionArgs.
 void init(Map<?,?> parameters, String ctrlId)
          Initialize the request parameters and call the abstract init method implemented by all concrete sub-classes of ClientActionArgs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controlId

protected String controlId

requestParameters

protected Map<?,?> requestParameters
The associated request parameters.

Constructor Detail

ClientActionArgs

public ClientActionArgs()
Method Detail

getClientActionArgs

public static ClientActionArgs getClientActionArgs(String clientAction,
                                                   Map<?,?> requestParameters,
                                                   String controlId)
Retrieves the ClientActionArgs responsible for the specified client action. The ClientActionArgs object is initialized with the needed request parameters.

Parameters:
clientAction - a client action string
requestParameters - the request parameters
Returns:
ClientActionArgs- the ClientActionArgs object

addClientActionArgs

public static void addClientActionArgs(String clientAction,
                                       String argsClassName)
Add a client action and ClientActionArgs class mapping. Users can also replace an existing mapping by using their own class for an existing client action.

Parameters:
clientAction - the client action (usually a Javascript method)
argsClassName - a concrete sub-class of ClientActionArgs associated with this client action

init

public final void init(Map<?,?> parameters,
                       String ctrlId)
                throws Exception
Initialize the request parameters and call the abstract init method implemented by all concrete sub-classes of ClientActionArgs.

Parameters:
parameters - the request parameters
Throws:
Exception

init

public abstract void init()
                   throws Exception
Initialize the sub-class of ClientActionArgs.

Throws:
Exception

getRequestParameters

public Map<?,?> getRequestParameters()
Returns the request parameters for this client action.

Returns:
Map- the associated request parameters.

getControlId

public String getControlId()

getWebGeometry

public abstract WebGeometry getWebGeometry()

getMapGeometry

public abstract WebGeometry getMapGeometry()