| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.apache.struts.validator.Resourcespublic class Resourcesextends java.lang.ObjectField Summary | |
static String |
|
private static String |
|
static String |
|
private static String |
|
static String |
|
private static String |
|
Method Summary | |
static ActionError |
|
static ActionMessage |
|
static ActionMessage |
|
private static String[] |
|
static String[] |
|
static Locale |
|
static String |
|
static String |
|
static String |
|
static String |
|
static MessageResources |
|
static MessageResources |
|
static ValidatorResources |
|
static Validator |
|
public static String ACTION_ERRORS_KEY
Deprecated. This will be removed after Struts 1.2
Resources key theActionErrorsis stored under.
private static String ACTION_MESSAGES_PARAM
Resources key theActionMessagesis stored under.
public static String HTTP_SERVLET_REQUEST_KEY
Deprecated. This will be removed after Struts 1.2
Resources key theHttpServletRequestis stored under.
private static String HTTP_SERVLET_REQUEST_PARAM
Resources key theHttpServletRequestis stored under.
public static String SERVLET_CONTEXT_KEY
Deprecated. This will be removed after Struts 1.2
Resources key theServletContextis stored under.
private static String SERVLET_CONTEXT_PARAM
Resources key theServletContextis stored under.
public static ActionError getActionError(HttpServletRequest request, ValidatorAction va, Field field)
Deprecated. Use getActionMessage() instead. This will be removed after Struts 1.2.
Gets theActionErrorbased on theValidatorActionmessage and theField's arg objects.
- Parameters:
request- the servlet requestva- Validator actionfield- the validator Field
public static ActionMessage getActionMessage(HttpServletRequest request, ValidatorAction va, Field field)
Gets theActionMessagebased on theValidatorActionmessage and theField's arg objects.
- Parameters:
request- the servlet requestva- Validator actionfield- the validator Field
public static ActionMessage getActionMessage(Validator validator, HttpServletRequest request, ValidatorAction va, Field field)
Gets theActionMessagebased on theValidatorActionmessage and theField's arg objects.
- Parameters:
validator- the Validatorrequest- the servlet requestva- Validator actionfield- the validator Field
private static String[] getArgValues(ServletContext application,
HttpServletRequest request,
MessageResources defaultMessages,
Locale locale,
Arg[] args)Gets the message arguments based on the currentValidatorActionandField.
- Parameters:
application- the servlet contextrequest- the servlet requestdefaultMessages- Default message resourceslocale- the localeargs- The arguments for the message
public static String[] getArgs(String actionName,
MessageResources messages,
Locale locale,
Field field)Gets the message arguments based on the currentValidatorActionandField.
- Parameters:
actionName- action namemessages- message resourceslocale- the localefield- the validator field
public static Locale getLocale(HttpServletRequest request)
Deprecated. Use RequestUtils.getUserLocale() instead. This will be removed after Struts 1.2.
Get theLocaleof the current user.
- Parameters:
request- servlet request
public static String getMessage(HttpServletRequest request,
String key)Gets theLocalesensitive value based on the key passed in.
- Parameters:
request- servlet requestkey- the request key
public static String getMessage(ServletContext application,
HttpServletRequest request,
MessageResources defaultMessages,
Locale locale,
ValidatorAction va,
Field field)Gets theLocalesensitive value based on the key passed in.
- Parameters:
application- the servlet contextrequest- the servlet requestdefaultMessages- The default Message resourceslocale- The localeva- The Validator Actionfield- The Validator Field
public static String getMessage(MessageResources messages, Locale locale, String key)
Gets theLocalesensitive value based on the key passed in.
- Parameters:
messages- The Message resourceslocale- The locale.key- Key used to lookup the message
public static String getMessage(MessageResources messages, Locale locale, ValidatorAction va, Field field)
Gets the locale sensitive message based on theValidatorActionmessage and theField's arg objects.
- Parameters:
messages- The Message resourceslocale- The localeva- The Validator Actionfield- The Validator Field
public static MessageResources getMessageResources(HttpServletRequest request)
RetrieveMessageResourcesfor the module.
- Parameters:
request- the servlet request
public static MessageResources getMessageResources(ServletContext application, HttpServletRequest request, String bundle)
RetrieveMessageResourcesfor the module and bundle.
- Parameters:
application- the servlet contextrequest- the servlet requestbundle- the bundle key
public static ValidatorResources getValidatorResources(ServletContext application,
HttpServletRequest request)RetrieveValidatorResourcesfor the current module.
- Parameters:
application- Application Contextrequest- The ServletRequest
public static Validator initValidator(String key,
Object bean,
ServletContext application,
HttpServletRequest request,
ActionMessages errors,
int page)Initialize theValidatorto perform validation.
- Parameters:
key- The key that the validation rules are under (the form elements name attribute).bean- The bean validation is being performed on.application- servlet contextrequest- The current request object.errors- The object any errors will be stored in.page- This in conjunction with the page property of aFieldcan control the processing of fields. If the field's page is less than or equal to this page value, it will be processed.