|
|||||||||
| 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 java.lang.reflect.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, rendererType, selectedImage, showLoadingImage, style, styleClass, TEXT_RENDERER_TYPE, toolTip |
| Constructor Summary | |
|---|---|
TaskActionDescriptor(java.lang.Class taskClass,
java.lang.String actionMethodName,
java.lang.String displayName)
Creates a TaskActionDescriptor for the given actionMethodName with a text button renderer. |
|
TaskActionDescriptor(java.lang.reflect.Method actionMethod)
Creates a TaskActionDescriptor for the given actionMethod with a text button renderer. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Element |
generateXML(java.lang.Object task)
Generates the XML content for this action. |
java.lang.reflect.Method |
getActionMethod()
Returns the method that processes the action |
int |
getActionType()
Returns the action method type. |
java.lang.String |
getName()
Returns the name of the action method. |
java.lang.Object |
processAction(java.lang.Object task,
TaskEvent event)
Calls the action method on the specified task by passing it the TaskEvent object. |
java.lang.String |
toString()
|
| Methods inherited from class com.esri.adf.web.data.tasks.ButtonDescriptor |
|---|
generateButtonXML, getDefaultImage, getDisabledImage, getHoverImage, getRendererType, getSelectedImage, getStyle, getStyleClass, getToolTip, isDisabled, isShowLoadingImage, setDefaultImage, setDisabled, setDisabledImage, setHoverImage, 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 java.lang.reflect.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(java.lang.Class taskClass,
java.lang.String actionMethodName,
java.lang.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 ClassactionMethodName - the name of the action methoddisplayName - the display text for the action buttonpublic TaskActionDescriptor(java.lang.reflect.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 action| Method Detail |
|---|
public java.lang.String getName()
TaskActionDescriptorModelReturns the name of the action method.
Note that action methods take TaskEvent as its argument.
getName in interface TaskActionDescriptorModelgetName in class java.beans.FeatureDescriptorpublic java.lang.reflect.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 java.lang.Object processAction(java.lang.Object task,
TaskEvent event)
TaskActionDescriptorModeltask by passing it the TaskEvent object.
processAction in interface TaskActionDescriptorModeltask - 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 org.w3c.dom.Element generateXML(java.lang.Object task)
TaskActionDescriptorModelGenerates 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 TaskActionDescriptorModeltask - the task object
Elementpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||