Example usage for org.springframework.beans PropertyAccessException getPropertyChangeEvent

List of usage examples for org.springframework.beans PropertyAccessException getPropertyChangeEvent

Introduction

In this page you can find the example usage for org.springframework.beans PropertyAccessException getPropertyChangeEvent.

Prototype

@Nullable
public PropertyChangeEvent getPropertyChangeEvent() 

Source Link

Document

Return the PropertyChangeEvent that resulted in the problem.

Usage

From source file:ru.org.linux.util.ExceptionBindingErrorProcessor.java

@Override
public void processPropertyAccessException(PropertyAccessException e, BindingResult bindingResult) {
    if (e.getCause() instanceof IllegalArgumentException
            && (e.getCause().getCause() instanceof ScriptErrorException
                    || e.getCause().getCause() instanceof UserNotFoundException)) {
        bindingResult.rejectValue(e.getPropertyChangeEvent().getPropertyName(), null,
                e.getCause().getCause().getMessage());
    } else {//from w w w  .j  a  v a 2  s .c  o  m
        super.processPropertyAccessException(e, bindingResult);
    }
}