com.esri.adf.web.data.tasks
Interface TaskActionDescriptorModel

All Superinterfaces:
Serializable
All Known Implementing Classes:
TaskActionDescriptor

public interface TaskActionDescriptorModel
extends Serializable

TaskActionDescriptorModel objects provide metadata for a task action.

You should implement this interface only if you want to provide a custom action descriptor. Otherwise you want to use TaskActionDescriptor - the out-of-the-box implementation of this interface.


Method Summary
 Element generateXML(Object task)
           Generates the XML content for this action.
 String getDisplayName()
          Returns the display text for the action.
 String getName()
           Returns the name of the action method.
 String getRendererType()
           Returns the renderer type for the action.
 boolean isHidden()
          If true, the action button will not be displayed on the task UI
 Object processAction(Object task, TaskEvent event)
          Calls the action method on the specified task by passing it the TaskEvent object.
 

Method Detail

getName

String getName()

Returns the name of the action method.

Note that action methods take TaskEvent as its argument.

Returns:
the name of the action method

getDisplayName

String getDisplayName()
Returns the display text for the action. The value returned by this method is typically used to display the text on the action button.

Returns:
the display text for the action

getRendererType

String getRendererType()

Returns the renderer type for the action. The renderers supported out of the box are text-only buttons, image-only buttons and image-and-text buttons.

Returns:
the renderer type for the action

isHidden

boolean isHidden()
If true, the action button will not be displayed on the task UI

Returns:
if true, the action button will not be displayed on the task UI

processAction

Object processAction(Object task,
                     TaskEvent event)
Calls the action method on the specified task by passing it the TaskEvent object.

Parameters:
task - the task object on which the action method will be invoked
event - the TaskEvent method which will be passed as an argument to the action method
Returns:
the value returned by the action method

generateXML

Element generateXML(Object task)

Generates the XML content for this action. This XML is then transformed by the XSL used by the task control to generate the appropriate markup.

Note that if you implement this method and generate custom XML, you'll also need to provide the XSL that transforms this XML into the appropriate markup. The XSL file that the task control should use can be specified by using the xslFile attribute of the task tag.

Parameters:
task - the task object
Returns:
the generated XML Element