org.apache.struts.validator
public class Resources extends Object
Since: Struts 1.1
Version: $Rev: 164530 $ $Date: 2005-04-25 04:11:07 +0100 (Mon, 25 Apr 2005) $
| Field Summary | |
|---|---|
| static String | ACTION_ERRORS_KEY
Resources key the ActionErrors is stored under. |
| static String | ACTION_MESSAGES_PARAM
Resources key the ActionMessages is stored under. |
| static String | HTTP_SERVLET_REQUEST_KEY
Resources key the HttpServletRequest is stored under. |
| static String | HTTP_SERVLET_REQUEST_PARAM
Resources key the HttpServletRequest is stored under. |
| static String | SERVLET_CONTEXT_KEY
Resources key the ServletContext is stored under. |
| static String | SERVLET_CONTEXT_PARAM
Resources key the ServletContext is stored under. |
| Method Summary | |
|---|---|
| static ActionError | getActionError(HttpServletRequest request, ValidatorAction va, Field field)
Gets the ActionError based on the
ValidatorAction message and the Field's
arg objects. |
| static ActionMessage | getActionMessage(HttpServletRequest request, ValidatorAction va, Field field)
Gets the ActionMessage based on the
ValidatorAction message and the Field's
arg objects. |
| static ActionMessage | getActionMessage(Validator validator, HttpServletRequest request, ValidatorAction va, Field field)
Gets the ActionMessage based on the
ValidatorAction message and the Field's
arg objects. |
| static String[] | getArgs(String actionName, MessageResources messages, Locale locale, Field field)
Gets the message arguments based on the current
ValidatorAction and Field. |
| static String[] | getArgValues(ServletContext application, HttpServletRequest request, MessageResources defaultMessages, Locale locale, Arg[] args)
Gets the message arguments based on the current
ValidatorAction and Field. |
| static Locale | getLocale(HttpServletRequest request)
Get the Locale of the current user. |
| static String | getMessage(MessageResources messages, Locale locale, String key)
Gets the Locale sensitive value based on the key passed in. |
| static String | getMessage(HttpServletRequest request, String key)
Gets the Locale sensitive value based on the key passed in. |
| static String | getMessage(MessageResources messages, Locale locale, ValidatorAction va, Field field)
Gets the locale sensitive message based on the
ValidatorAction message and the Field's
arg objects. |
| static String | getMessage(ServletContext application, HttpServletRequest request, MessageResources defaultMessages, Locale locale, ValidatorAction va, Field field)
Gets the Locale sensitive value based on the key passed in. |
| static MessageResources | getMessageResources(HttpServletRequest request)
Retrieve MessageResources for the module. |
| static MessageResources | getMessageResources(ServletContext application, HttpServletRequest request, String bundle)
Retrieve MessageResources for the module and bundle. |
| static ValidatorResources | getValidatorResources(ServletContext application, HttpServletRequest request)
Retrieve ValidatorResources for the current module. |
| static Validator | initValidator(String key, Object bean, ServletContext application, HttpServletRequest request, ActionMessages errors, int page)
Initialize the Validator to perform validation.
|
Deprecated: This will be removed after Struts 1.2
Resources key theActionErrors is stored under.ActionMessages is stored under.Deprecated: This will be removed after Struts 1.2
Resources key theHttpServletRequest is stored under.HttpServletRequest is stored under.Deprecated: This will be removed after Struts 1.2
Resources key theServletContext is stored under.ServletContext is stored under.Deprecated: Use getActionMessage() instead. This will be removed after Struts 1.2.
Gets theActionError based on the
ValidatorAction message and the Field's
arg objects.Parameters: request the servlet request va Validator action field the validator Field
ActionMessage based on the
ValidatorAction message and the Field's
arg objects.Parameters: request the servlet request va Validator action field the validator Field
ActionMessage based on the
ValidatorAction message and the Field's
arg objects.Parameters: validator the Validator request the servlet request va Validator action field the validator Field
ValidatorAction and Field.Parameters: actionName action name messages message resources locale the locale field the validator field
ValidatorAction and Field.Parameters: application the servlet context request the servlet request defaultMessages Default message resources locale the locale args The arguments for the message
Deprecated: Use RequestUtils.getUserLocale() instead. This will be removed after Struts 1.2.
Get theLocale of the current user.Parameters: request servlet request
Locale sensitive value based on the key passed in.Parameters: messages The Message resources locale The locale. key Key used to lookup the message
Locale sensitive value based on the key passed in.Parameters: request servlet request key the request key
ValidatorAction message and the Field's
arg objects.Parameters: messages The Message resources locale The locale va The Validator Action field The Validator Field
Locale sensitive value based on the key passed in.Parameters: application the servlet context request the servlet request defaultMessages The default Message resources locale The locale va The Validator Action field The Validator Field
MessageResources for the module.Parameters: request the servlet request
MessageResources for the module and bundle.Parameters: application the servlet context request the servlet request bundle the bundle key
ValidatorResources for the current module.Parameters: application Application Context request The ServletRequest
Validator to 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 context request The current request object. errors The object any errors will be stored in. page This in conjunction with the page property of a
Field can control the processing of fields. If the field's
page is less than or equal to this page value, it will be processed.