org.apache.tapestry.form
Class ValidationMessagesImpl
java.lang.Object
org.apache.tapestry.form.ValidationMessagesImpl
- All Implemented Interfaces:
- ValidationMessages
- Direct Known Subclasses:
- FormComponentContributorContextImpl
public class ValidationMessagesImpl
- extends Object
- implements ValidationMessages
Wrapper around
ValidationStrings.getMessagePattern(String, Locale)
and
MessageFormat.format(java.lang.String, java.lang.Object[])
.
- Since:
- 4.0
- Author:
- Howard Lewis Ship
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValidationMessagesImpl
public ValidationMessagesImpl(IFormComponent field,
Locale locale)
formatValidationMessage
public String formatValidationMessage(String messageOverride,
String messageKey,
Object[] arguments)
- Description copied from interface:
ValidationMessages
- Formats a validation message. Automatically chooses the correct localization.
- Specified by:
formatValidationMessage
in interface ValidationMessages
- Parameters:
messageOverride
- a supplied override to the default message format taken from the
ValidationStrings.properties message catalog.messageKey
- used to look up the message format when messageOverride is blank (null or empty)arguments
- array of arguments formatted with the message format
getLocale
public Locale getLocale()
- Description copied from interface:
ValidationMessages
- Returns the locale for which messages are generated.
- Specified by:
getLocale
in interface ValidationMessages
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.