Annotation Interface BigDecimalConversion


@Documented @Inherited @Target(FIELD) @Retention(RUNTIME) public @interface BigDecimalConversion

Defines a String form field (whether on a Struts Action or model of ModelDriven Struts Action) should be parsed to a recipient field of BigDecimal type and error message to display if this fails.

By default, messages are added to the actionErrors list but this can be overridden by messageType:

ERROR
Message added to Action level error messages. Default.
FIELD
Message added to field error messages.
MESSAGE
Message added to Action level info messages.

Other parameters

message
If not empty string, text message to display. Used if messageKey is empty string or finds no message.
messageKey
If not empty string, message key to retrieve from Action's TextProvider. Uses message if no key provided or no message found.
parsedFieldName
If not empty string, name of field to contain parsed value. Defaults to 'parsed' plus capitalised field name, such as 'parsedLimit'.
  • Element Details

    • message

      String message
      Default:
      ""
    • messageKey

      String messageKey
      Default:
      ""
    • messageType

      Default:
      ERROR
    • parsedFieldName

      String parsedFieldName
      Default:
      ""