|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.beans.FeatureDescriptor
com.esri.adf.web.data.tasks.ButtonDescriptor
com.esri.adf.web.data.tasks.TaskActionDescriptor
public class TaskActionDescriptor
The TaskActionDescriptor
class provides metadata for the task actions.
Action methods are of 2 types - those that take no arguments and those that take TaskEvent
as its argument.
The latter is the more frequently used approach since it gives access to useful ADF objects.
This is the out of box implementation of the TaskActionDescriptorModel
interface and supports the rendering
of action buttons as text-only buttons, image-only buttons and image-and-text buttons.
Field Summary | |
---|---|
static int |
ACTION_LISTENER_METHOD
The action method type that takes TaskEvent as its argument |
static int |
ACTION_METHOD
The action method type that takes no arguments |
protected Method |
actionMethod
The method that processes this action. |
protected int |
actionType
The action method type. |
Fields inherited from class com.esri.adf.web.data.tasks.ButtonDescriptor |
---|
defaultImage, disabled, disabledImage, hoverImage, IMAGE_RENDERER_TYPE, IMAGEANDTEXT_RENDERER_TYPE, justBeenDisabled, rendererType, selectedImage, showLoadingImage, style, styleClass, TEXT_RENDERER_TYPE, toolTip, VALIDATE_ALL_PARAMS, VALIDATE_NONE_PARAMS |
Constructor Summary | |
---|---|
TaskActionDescriptor(Class taskClass,
String actionMethodName,
String displayName)
Creates a TaskActionDescriptor for the given actionMethodName with a text button renderer. |
|
TaskActionDescriptor(Method actionMethod)
Creates a TaskActionDescriptor for the given actionMethod with a text button renderer. |
Method Summary | |
---|---|
Element |
generateXML(Object task)
Generates the XML content for this action. |
Method |
getActionMethod()
Returns the method that processes the action |
int |
getActionType()
Returns the action method type. |
String |
getName()
Returns the name of the action method. |
Object |
processAction(Object task,
TaskEvent event)
Calls the action method on the specified task by passing it the TaskEvent object. |
String |
toString()
|
Methods inherited from class com.esri.adf.web.data.tasks.ButtonDescriptor |
---|
generateButtonXML, getDefaultImage, getDisabledImage, getHoverImage, getParamsToValidate, getRendererType, getSelectedImage, getStyle, getStyleClass, getToolTip, isDisabled, isShowLoadingImage, setDefaultImage, setDisabled, setDisabledImage, setHoverImage, setParamsToValidate, setRendererType, setSelectedImage, setShowLoadingImage, setStyle, setStyleClass, setToolTip |
Methods inherited from class java.beans.FeatureDescriptor |
---|
attributeNames, getDisplayName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.esri.adf.web.data.tasks.TaskActionDescriptorModel |
---|
getDisplayName, getRendererType, isHidden |
Field Detail |
---|
public static final int ACTION_METHOD
public static final int ACTION_LISTENER_METHOD
TaskEvent
as its argument
protected transient Method actionMethod
TaskEvent
as its argument. The latter is the more frequently used approach since it gives access to
useful ADF objects.
protected int actionType
ACTION_METHOD
and ACTION_LISTENER_METHOD
are the 2 possible action types.
The latter is the more frequently used approach since it gives access to useful ADF objects.
Constructor Detail |
---|
public TaskActionDescriptor(Class taskClass, String actionMethodName, String displayName)
Creates a TaskActionDescriptor
for the given actionMethodName
with a text button renderer.
If the action method does not take any argument it is deemed to be of type ACTION_METHOD
, otherwise it is
of type ACTION_LISTENER_METHOD
.
taskClass
- the task Class
actionMethodName
- the name of the action methoddisplayName
- the display text for the action buttonpublic TaskActionDescriptor(Method actionMethod)
Creates a TaskActionDescriptor
for the given actionMethod
with a text button renderer.
If the action method does not take any argument it is deemed to be of type ACTION_METHOD
, otherwise it is
of type ACTION_LISTENER_METHOD
.
actionMethod
- the method that processes the actionMethod Detail |
---|
public String getName()
TaskActionDescriptorModel
Returns the name of the action method.
Note that action methods take TaskEvent
as its argument.
getName
in interface TaskActionDescriptorModel
getName
in class FeatureDescriptor
public Method getActionMethod()
public int getActionType()
ACTION_METHOD
and ACTION_LISTENER_METHOD
are the 2 possible
action types. The latter is the more frequently used approach since it gives access to useful ADF objects.
public Object processAction(Object task, TaskEvent event)
TaskActionDescriptorModel
task
by passing it the TaskEvent
object.
processAction
in interface TaskActionDescriptorModel
task
- the task object on which the action method will be invokedevent
- the TaskEvent
method which will be passed as an argument to the action method
public Element generateXML(Object task)
TaskActionDescriptorModel
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.
generateXML
in interface TaskActionDescriptorModel
task
- the task object
Element
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |