Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.struts.util.StrutsValidatorUtil
public class StrutsValidatorUtil
extends java.lang.Object
Field Summary | |
static String |
|
static String |
|
static String |
|
Method Summary | |
static ActionError |
|
static String[] |
|
static Locale |
|
static String |
|
static String |
|
static String |
|
static MessageResources |
|
static MessageResources |
|
static ValidatorResources |
|
static ValidatorResources |
|
static Validator |
|
public static String ACTION_ERRORS_KEY
Resources key theActionErrors
is stored under.
public static String HTTP_SERVLET_REQUEST_KEY
Resources key theHttpServletRequest
is stored under.
public static String SERVLET_CONTEXT_KEY
Resources key theServletContext
is stored under.
public static ActionError getActionError(HttpServletRequest request, ValidatorAction va, Field field)
Deprecated. As of Struts 1.1, replaced by
Resources.getActionError(HttpServletRequest,ValidatorAction,Field)
Gets theActionError
based on theValidatorAction
message and theField
's arg objects.
public static String[] getArgs(String actionName, MessageResources messages, Locale locale, Field field)
Deprecated. As of Struts 1.1, replaced by
Resources.getArgs(String,MessageResources,Locale,Field)
Gets the message arguments based on the currentValidatorAction
andField
.
public static Locale getLocale(HttpServletRequest request)
Get theLocale
of the current user.
public static String getMessage(HttpServletRequest request, String key)
Gets theLocale
sensitive value based on the key passed in.
public static String getMessage(MessageResources messages, Locale locale, String key)
Gets theLocale
sensitive value based on the key passed in.
public static String getMessage(MessageResources messages, Locale locale, ValidatorAction va, Field field)
Deprecated. As of Struts 1.1, replaced by
Resources.getMessage(MessageResources,Locale,ValidatorAction,Field)
Gets the locale sensitive message based on theValidatorAction
message and theField
's arg objects.
public static MessageResources getMessageResources(HttpServletRequest request)
RetrieveMessageResources
for the application module.
public static MessageResources getMessageResources(ServletContext application)
Deprecated. This method can only return the resources for the default module. Use getMessageResources(HttpServletRequest) to get the resources for the current application module.
RetrieveMessageResources
for the application module.
public static ValidatorResources getValidatorResources(ServletContext application)
Deprecated. In Struts 1.1 This method can only return the resources for the default module. Use getValidatorResources(HttpServletRequest, ServletContext) to get the resources for the current application module.
RetrieveValidatorResources
for the module.
public static ValidatorResources getValidatorResources(ServletContext application, HttpServletRequest request)
RetrieveValidatorResources
for the current module.
public static Validator initValidator(String key, Object bean, ServletContext application, HttpServletRequest request, ActionErrors errors, int page)
Deprecated. As of Struts 1.1, replaced by
Resources.initValidator(String,Object,ServletContext,HttpServletRequest,ActionErrors,int)
Initialize theValidator
to perform validation.
- Parameters:
key
- The key that the validation rules are under (the form elements name attribute).request
- The current request object.errors
- The object any errors will be stored in.