Uses of Class
org.apache.struts.action.ActionMessages
Package
Description
The action package is the core of the struts framework,
providing the "Controller" aspect of a MVC model.
This package provides objects that encapsulate access to
the request and session-scoped resources to service
command processing.
The "config" package contains configuration objects that correspond to
elements that may be specified in the
struts-config.xml
module configuration file.The validator package provides a series of classes to validate
ActionForm
type of input.Generated classes by antlr to support the
validwhen
validator.-
Uses of ActionMessages in org.apache.struts.action
Modifier and TypeClassDescriptionclass
A class that encapsulates the error messages being reported by thevalidate()
method of anActionForm
.Modifier and TypeMethodDescriptionprotected ActionMessages
Action.getErrors
(HttpServletRequest request) Retrieves any existing errors placed in the request by previous actions.protected ActionMessages
Action.getMessages
(HttpServletRequest request) Retrieves any existing messages placed in the request by previous actions.Modifier and TypeMethodDescriptionvoid
ActionMessages.add
(ActionMessages actionMessages) Adds the messages from the givenActionMessages
object to this set of messages.protected void
Action.addErrors
(HttpServletRequest request, ActionMessages errors) Adds the specified errors keys into the appropriate request attribute for use by the <html:errors> tag, if any messages are required.protected void
Action.addMessages
(HttpServletRequest request, ActionMessages messages) Adds the specified messages keys into the appropriate request attribute for use by the <html:messages> tag (if messages="true" is set), if any messages are required.protected void
Action.saveErrors
(HttpServletRequest request, ActionMessages errors) Save the specified error messages keys into the appropriate request attribute for use by the <html:errors> tag, if any messages are required.protected void
Action.saveErrors
(HttpSession session, ActionMessages errors) Save the specified error messages keys into the appropriate session attribute for use by the <html:messages> tag (if messages="false") or <html:errors>, if any error messages are required.protected void
Action.saveMessages
(HttpServletRequest request, ActionMessages messages) Save the specified messages keys into the appropriate request attribute for use by the <html:messages> tag (if messages="true" is set), if any messages are required.protected void
Action.saveMessages
(HttpSession session, ActionMessages messages) Save the specified messages keys into the appropriate session attribute for use by the <html:messages> tag (if messages="true" is set), if any messages are required.ModifierConstructorDescriptionActionMessages
(ActionMessages messages) Create anActionMessages
object initialized with the given messages. -
Uses of ActionMessages in org.apache.struts.chain.contexts
Modifier and TypeMethodDescriptionActionContext.getErrors()
Retrieve error messages from an internal cache, creating an empty cache if one is not already present.ActionContextBase.getErrors()
ServletActionContext.getErrors()
ActionContext.getMessages()
Retrieve messages from an internal cache, creating an empty cache if one is not already present.ActionContextBase.getMessages()
ServletActionContext.getMessages()
Modifier and TypeMethodDescriptionvoid
ActionContextBase.addActionMessages
(String key, ActionMessages messages) Add the given messages to a cache stored in this Context, under key.void
ActionContext.addErrors
(ActionMessages errors) Append the given errors keys to an internal cache, creating the cache if one is not already present.void
ActionContextBase.addErrors
(ActionMessages errors) void
ServletActionContext.addErrors
(ActionMessages errors) void
ActionContext.addMessages
(ActionMessages messages) Append the given messages keys to an internal cache, creating the cache if one is not already present.void
ActionContextBase.addMessages
(ActionMessages messages) void
ServletActionContext.addMessages
(ActionMessages messages) void
ActionContextBase.saveActionMessages
(String scopeId, String key, ActionMessages messages) Save the givenmessages
into the map identified by the givenscopeId
under the givenkey
.void
ActionContextBase.saveActionMessages
(String key, ActionMessages messages) Save the given ActionMessages into the request scope under the given key, clearing the attribute if the messages are empty or null.void
ActionContext.saveErrors
(ActionMessages errors) Save the given error messages to the internal cache, clearing any previous messages in the cache.void
ActionContextBase.saveErrors
(ActionMessages errors) void
ServletActionContext.saveErrors
(ActionMessages errors) void
ActionContext.saveMessages
(String scope, ActionMessages messages) Save the given messages to the internal cache, clearing any previous messages in the cache, but only for the specified scope.void
ActionContext.saveMessages
(ActionMessages messages) Save the given messages to the internal cache, clearing any previous messages in the cache.void
ActionContextBase.saveMessages
(String scope, ActionMessages messages) Adapt a legacy form of SaveMessages to the ActionContext API by storing the ActoinMessages under the default scope.void
ActionContextBase.saveMessages
(ActionMessages messages) void
ServletActionContext.saveMessages
(ActionMessages messages) -
Uses of ActionMessages in org.apache.struts.config
Modifier and TypeMethodDescriptionConfigHelper.getActionMessages()
ConfigHelperInterface.getActionMessages()
Theorg.apache.struts.action.ActionFormBeans
collection for this application. -
Uses of ActionMessages in org.apache.struts.validator
Modifier and TypeMethodDescriptionstatic Validator
Resources.initValidator
(String key, Object bean, ServletContext application, HttpServletRequest request, ActionMessages errors, int page) Initialize theValidator
to perform validation.static Object
FieldChecks.validateByte
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to a byte primitive.static Object
FieldChecks.validateByteLocale
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to a byte primitive.static Object
FieldChecks.validateCreditCard
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field is a valid credit card number.static Object
FieldChecks.validateDate
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field is a valid date.static Object
FieldChecks.validateDouble
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to a double primitive.static Object
FieldChecks.validateDoubleLocale
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to a double primitive.static boolean
FieldChecks.validateDoubleRange
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if a fields value is within a range (min & max specified in the vars attribute).static boolean
FieldChecks.validateEmail
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if a field has a valid e-mail address.static Object
FieldChecks.validateFloat
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to a float primitive.static Object
FieldChecks.validateFloatLocale
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to a float primitive.static boolean
FieldChecks.validateFloatRange
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if a fields value is within a range (min & max specified in the vars attribute).static Object
FieldChecks.validateInteger
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to an int primitive.static Object
FieldChecks.validateIntegerLocale
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to an int primitive.static boolean
FieldChecks.validateIntRange
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if a fields value is within a range (min & max specified in the vars attribute).static Object
FieldChecks.validateLong
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to a long primitive.static Object
FieldChecks.validateLongLocale
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to a long primitive.static boolean
FieldChecks.validateLongRange
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if a fields value is within a range (min & max specified in the vars attribute).static boolean
FieldChecks.validateMask
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field matches the regular expression in the field's mask attribute.static boolean
FieldChecks.validateMaxLength
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field's length is less than or equal to the maximum value.static boolean
FieldChecks.validateMinLength
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field's length is greater than or equal to the minimum value.static boolean
FieldChecks.validateRequired
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field isn't null and length of the field is greater than zero not including whitespace.static boolean
FieldChecks.validateRequiredIf
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field isn't null based on the values of other fields.static Object
FieldChecks.validateShort
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to a short primitive.static Object
FieldChecks.validateShortLocale
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field can safely be converted to a short primitive.static boolean
FieldChecks.validateUrl
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if a field has a valid url. -
Uses of ActionMessages in org.apache.struts.validator.validwhen
Modifier and TypeMethodDescriptionstatic boolean
ValidWhen.validateValidWhen
(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) Checks if the field matches the boolean expression specified intest
parameter.