public class AdminFormHandler extends GenericFormHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
RESOURCE_BUNDLE |
protected static java.util.ResourceBundle |
sResources
The resource bundle and errors
|
static int |
STATUS_ERROR_REDIRECT
Constant to indicate that the state of the form errors, but that
the form should perform a redirect.
|
static int |
STATUS_ERROR_STAY
Constant to indicate that the state of the form errors, but that
the form should not perform a redirect.
|
static int |
STATUS_SUCCESS
Constant to indicate that the state of the form has no errors.
|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
AdminFormHandler()
Empty as all bean consructors usually are.
|
Modifier and Type | Method and Description |
---|---|
protected int |
checkFormError(java.lang.String pErrorURL,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Check to see if there were errors during the submit operation.
|
protected java.lang.String |
formatUserMessage(java.lang.String pKey,
DynamoHttpServletRequest pRequest)
Utility method to format a message with no arguments using the Locale of the user
|
protected java.lang.String |
formatUserMessage(java.lang.String pKey,
java.lang.Object pParam,
DynamoHttpServletRequest pRequest)
Utility method to format a message with no arguments using the Locale of the user
|
protected java.lang.String |
generatePropertyPath(java.lang.String pPropertyName)
Returns a Nucleus property path which can be used in a DropletFormException
|
java.lang.String |
getErrorRedirect()
Returns URL to which the user will be re-directed if an error has occured
|
protected java.util.Locale |
getLocale(DynamoHttpServletRequest pRequest) |
void |
setErrorRedirect(java.lang.String pErrorRedirect)
Sets URL to which the user will be re-directed if an error has occured
|
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
afterGet, beforeGet
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
public static final java.lang.String RESOURCE_BUNDLE
public static final int STATUS_SUCCESS
checkFormError
method.public static final int STATUS_ERROR_STAY
checkFormError
method.public static final int STATUS_ERROR_REDIRECT
checkFormError
method.protected static java.util.ResourceBundle sResources
public AdminFormHandler()
public void setErrorRedirect(java.lang.String pErrorRedirect)
public java.lang.String getErrorRedirect()
protected int checkFormError(java.lang.String pErrorURL, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pErrorURL
- the URL to redirect to if there are any form errorspRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet ioSTATUS_SUCCESS
,
STATUS_ERROR_STAY
,
STATUS_ERROR_REDIRECT
protected java.lang.String generatePropertyPath(java.lang.String pPropertyName)
pPropertyName
- the string reprsentation of a propertyprotected java.util.Locale getLocale(DynamoHttpServletRequest pRequest)
pRequest
- the request object which can be used to extract the user's localeprotected java.lang.String formatUserMessage(java.lang.String pKey, DynamoHttpServletRequest pRequest)
pKey
- the identifier for the message to retrieve out of the ResourceBundlepRequest
- the request object which can be used to extract the user's localeprotected java.lang.String formatUserMessage(java.lang.String pKey, java.lang.Object pParam, DynamoHttpServletRequest pRequest)
pKey
- the identifier for the message to retrieve out of the ResourceBundlepRequest
- the request object which can be used to extract the user's locale