org.springframework.binding.form.support
Class DefaultBindingErrorMessageProvider

java.lang.Object
  extended by org.springframework.binding.form.support.DefaultBindingErrorMessageProvider
All Implemented Interfaces:
BindingErrorMessageProvider

public class DefaultBindingErrorMessageProvider
extends Object
implements BindingErrorMessageProvider

Default implementation of BindingErrorMessageProvider.

Author:
Oliver Hutchison

Constructor Summary
DefaultBindingErrorMessageProvider()
           
 
Method Summary
 ValidationMessage getErrorMessage(FormModel formModel, String propertyName, Object valueBeingSet, Exception e)
          Translates the provided exception details into a ValidationMessage that will be used to provide feedback to the end user.
protected  String getMessageCodeForException(Exception e)
           
protected  MessageSourceAccessor getMessageSourceAccessor()
           
 void setMessageSourceAccessor(MessageSourceAccessor messageSourceAccessor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBindingErrorMessageProvider

public DefaultBindingErrorMessageProvider()
Method Detail

setMessageSourceAccessor

public void setMessageSourceAccessor(MessageSourceAccessor messageSourceAccessor)

getMessageSourceAccessor

protected MessageSourceAccessor getMessageSourceAccessor()

getErrorMessage

public ValidationMessage getErrorMessage(FormModel formModel,
                                         String propertyName,
                                         Object valueBeingSet,
                                         Exception e)
Description copied from interface: BindingErrorMessageProvider
Translates the provided exception details into a ValidationMessage that will be used to provide feedback to the end user. Generally these exceptions results from type conversion problems.

Specified by:
getErrorMessage in interface BindingErrorMessageProvider
Parameters:
formModel - the formModel
propertyName - the propertyName
valueBeingSet - the value which triggered the exception

getMessageCodeForException

protected String getMessageCodeForException(Exception e)


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.