Spring Framework PropertyAccessException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework PropertyAccessException class.

This code example shows how to use the following methods:getCause
     */ 
    @Override 
    public void processPropertyAccessException(PropertyAccessException e, BindingResult bindingResult) {
 
        TypeOrFormatMismatchException converted = null;
        if (Controllers.exceptionMatch(e.getCause().getClass(), PropertyEditingException.class)) {
            converted = new TypeOrFormatMismatchException(e, bindingResult);
            super.processPropertyAccessException(converted, bindingResult);
        } else { 
            super.processPropertyAccessException(e, bindingResult);
        } 
    } 
 
    /** 
     * {@inheritDoc} 
     */ 
    @Override 
    public void afterPropertiesSet() throws Exception {
        if (factoryBean == null) {
            factoryBean = new JseLocalValidatorFactoryBean();
3
CodeRank
This code example shows how to use the following methods:getCause
        super(e.getPropertyChangeEvent(), generateMessage(e, binding), null);
        this.e = e;
    } 
 
    protected static String generateMessage(PropertyAccessException e, BindingResult binding) {
        PropertyEditingException ex = (PropertyEditingException) e.getCause();
        return ex.getMessage();
    } 
 
    /** 
     * {@inheritDoc} 
     */ 
    @Override 
    public String getErrorCode() {
        return ((PropertyEditingException) e.getCause()).getCode();
    } 
 
} 
4
CodeRank
See Code Examples for Spring Framework PropertyAccessException Methods: