Examples of ConversionError


Examples of br.com.caelum.vraptor.converter.ConversionError

      if (date == null) {
        return null;
      }
      return LocalDate.fromDateFields(date);
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_date"), value));
    }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.ConversionError

      if (datetime == null) {
        return null;
      }
      return LocalDateTime.fromDateFields(datetime);
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_datetime"), value));
    }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.ConversionError

          if (time == null) {
            return null;
          }
          return LocalTime.fromDateFields(time);
        } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value));
        }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.ConversionError

                return null;
            }
           
            return out.toLocalDate();
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_date"), value));
    }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.ConversionError

                return null;
            }
           
            return out.toDateTime();
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_datetime"), value));
    }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.ConversionError

                return null;
            }
           
            return out.toLocalDateTime();
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_datetime"), value));
    }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.ConversionError

                return null;
            }
           
            return out.toLocalTime();
        } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value));
        }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.ConversionError

                return null;
            }
           
            return out.toDateMidnight();
    } catch (Exception e) {
      throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_datetime"), value));
    }
  }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.ConversionError

            final Locale locale = localization.getLocale();
            DecimalFormat fmt = ((DecimalFormat) DecimalFormat.getInstance(locale));

            return fmt.parse(value).floatValue();
        } catch (ParseException e) {
            throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_number"), value));
        }
    }
View Full Code Here

Examples of br.com.caelum.vraptor.converter.ConversionError

            final Locale locale = localization.getLocale();
            DecimalFormat fmt = ((DecimalFormat) DecimalFormat.getInstance(locale));

            return fmt.parse(value).floatValue();
        } catch (ParseException e) {
            throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_number"), value));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.