Package org.apache.wicket.util.convert

Examples of org.apache.wicket.util.convert.IConverter.convertToObject()


    {
      final IConverter converter = getConverter(getType());

      try
      {
        convertedInput = (T)converter.convertToObject(getInput(), getLocale());
      }
      catch (ConversionException e)
      {
        ValidationError error = new ValidationError();
        if (e.getResourceKey() != null)
View Full Code Here


    else
    {
      final IConverter converter = getConverter(getType());
      try
      {
        convertedInput = converter.convertToObject(getInput(), getLocale());
      }
      catch (ConversionException e)
      {
        ValidationError error = new ValidationError();
        if (e.getResourceKey() != null)
View Full Code Here

    {
      final IConverter converter = getConverter(getType());

      try
      {
        convertedInput = (T)converter.convertToObject(getInput(), getLocale());
      }
      catch (ConversionException e)
      {
        ValidationError error = new ValidationError();
        if (e.getResourceKey() != null)
View Full Code Here

            try {
                Collection<T> convertedInput = new ArrayList<T>();
                if (inputs != null) {
                    for (String input : inputs) {
                        curInput = input;
                        convertedInput.add(((T) converter.convertToObject(curInput, getLocale())));
                    }
                }
                return convertedInput;
            } catch (ConversionException e) {
                ValidationError error = new ValidationError();
View Full Code Here

    else
    {
      final IConverter converter = getConverter(getType());
      try
      {
        convertedInput = converter.convertToObject(getInput(), getLocale());
      }
      catch (ConversionException e)
      {
        ValidationError error = new ValidationError();
        if (e.getResourceKey() != null)
View Full Code Here

    final Class paramClass = parameterClasses[0];
    try
    {
      final IConverter converter = Application.get().getApplicationSettings()
          .getConverterLocatorFactory().newConverterLocator().getConverter(paramClass);
      final Object param = converter.convertToObject(value, locale);
      if (param == null)
      {
        throw new MarkupException("Unable to convert value '" + value + "' into "
            + paramClass + ". May be there is no converter for that type registered?");
      }
View Full Code Here

    else if (!Strings.isEmpty(getInput()))
    {
      final IConverter converter = getConverter(type);
      try
      {
        convertedInput = converter.convertToObject(getInput(), getLocale());
      }
      catch (ConversionException e)
      {
        ValidationError error = new ValidationError();
        if (e.getResourceKey() != null)
View Full Code Here

    else
    {
      final IConverter converter = getConverter(getType());
      try
      {
        convertedInput = (T)converter.convertToObject(getInput(), getLocale());
      }
      catch (ConversionException e)
      {
        ValidationError error = new ValidationError();
        if (e.getResourceKey() != null)
View Full Code Here

    final Class< ? > paramClass = parameterClasses[0];
    try
    {
      final IConverter converter = Application.get().getConverterLocator().getConverter(
        paramClass);
      final Object param = converter.convertToObject(value, locale);
      if (param == null)
      {
        throw new MarkupException("Unable to convert value '" + value + "' into " +
          paramClass + ". May be there is no converter for that type registered?");
      }
View Full Code Here

      return object;
    }
    IConverter converter = converterSupplier.getConverter(clz);
    if (object instanceof String)
    {
      return converter.convertToObject((String)object, locale);
    }
    else if (clz == String.class)
    {
      return converter.convertToString(object, locale);
    }
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.