public class ActionSupport extends Object implements Action, Serializable, IllegalArgumentAware
Action,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected String |
command |
protected Map |
errorMap |
protected Collection |
errorMessages |
protected org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
ActionSupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
addError(String fieldName,
String errorMessage)
This method is used to attach an error message to a particular form field.
|
void |
addErrorMessage(String anErrorMessage)
Add an error message to this action
|
void |
addIllegalArgumentException(String fieldName,
IllegalArgumentException e) |
String |
doDefault()
"default" command
|
protected String |
doExecute() |
protected void |
doValidation()
Subclasses may override this method to provide validation of input data.
|
String |
execute()
Execute will first check the request for a result exception.
|
protected String |
getActionName()
This is used to get the current action's class name
|
String |
getCommandName() |
Collection |
getErrorMessages()
Get the list of error messages for this action
|
Map |
getErrors()
Get the field specific errors associated with this action.
|
boolean |
getHasErrorMessages()
Check whether there are any error messages
|
boolean |
getHasErrors()
Check whether there are any errors associated with this action.
|
Locale |
getLocale()
Get the locale for this action.
|
protected String |
getPropertyEditorMessage(String fieldName,
PropertyEditorException pe)
This method is called from addIllegalArgumentException and it should return an error message (that may be
localized).
|
String |
getText(String aTextName)
Get a text from the resource bundles associated with this action.
|
ResourceBundle |
getTexts()
Get the resource bundle associated with this action.
|
ResourceBundle |
getTexts(String aBundleName)
Get the named bundle.
|
TimeZone |
getTimezone()
Get the user's timezone for date/time formatting in text tag.
|
boolean |
invalidInput()
Check whether there are any error messages.
|
protected String |
invokeCommand()
Invokes an alternate execution path for the action.
|
boolean |
isCommand(String aName)
Detect whether a particular command has been issued
|
void |
setCommand(String command)
Support implementation of CommandDriven interface.
|
void |
setErrorMessages(Collection errorMessages) |
void |
setErrors(Map errorMap) |
protected void |
validate()
Do validation.
|
protected transient org.apache.commons.logging.Log log
protected Map errorMap
protected Collection errorMessages
protected String command
public void addIllegalArgumentException(String fieldName, IllegalArgumentException e)
addIllegalArgumentException in interface IllegalArgumentAwareprotected String getPropertyEditorMessage(String fieldName, PropertyEditorException pe)
public void setCommand(String command)
CommandDrivenpublic boolean isCommand(String aName)
public String getCommandName()
public String execute() throws Exception
public Collection getErrorMessages()
public void setErrorMessages(Collection errorMessages)
public boolean getHasErrorMessages()
public void addErrorMessage(String anErrorMessage)
anErrorMessage - public void addError(String fieldName, String errorMessage)
fieldName - name of fielderrorMessage - the error messagepublic Map getErrors()
public void setErrors(Map errorMap)
public boolean getHasErrors()
public Locale getLocale()
public ResourceBundle getTexts(String aBundleName)
aBundleName - bundle namepublic ResourceBundle getTexts()
public String getText(String aTextName)
aTextName - name of text to be foundprotected void doValidation()
protected void validate()
throws ResultException
ResultExceptionpublic boolean invalidInput()
protected String invokeCommand() throws Exception
Exceptionprotected String getActionName()
public TimeZone getTimezone()
Copyright © 2013 Atlassian. All Rights Reserved.