Package org.apache.wicket.util.convert

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


      final Class<?> objectClass = modelObject.getClass();

      final IConverter converter = getConverter(objectClass);

      // Model string from property
      final String modelString = converter.convertToString(modelObject, getLocale());

      if (modelString != null)
      {
        // If we should escape the markup
        if (getFlag(FLAG_ESCAPE_MODEL_STRINGS))
View Full Code Here


      final Class<?> objectClass = modelObject.getClass();

      final IConverter converter = getConverter(objectClass);

      // Model string from property
      final String modelString = converter.convertToString(modelObject, getLocale());

      return modelString;
    }
    return null;
  }
View Full Code Here

            {
              s = o.toString();
            }
            else
            {
              s = converter.convertToString(o, Session.get().getLocale());
            }

            out.print(quoteValue(s));
          }
        }
View Full Code Here

      final Class<?> objectClass = modelObject.getClass();

      final IConverter converter = getConverter(objectClass);

      // Model string from property
      final String modelString = converter.convertToString(modelObject, getLocale());

      if (modelString != null)
      {
        // If we should escape the markup
        if (getFlag(FLAG_ESCAPE_MODEL_STRINGS))
View Full Code Here

      String label = "";

      if (objectClass != null && objectClass != String.class)
      {
        final IConverter converter = getConverter(objectClass);
        label = converter.convertToString(displayValue, getLocale());
      }
      else if (displayValue != null)
      {
        label = displayValue.toString();
      }
View Full Code Here

    String displayValue = "";
    if (objectClass != null && objectClass != String.class)
    {
      final IConverter converter = getConverter(objectClass);

      displayValue = converter.convertToString(objectValue, getLocale());
    }
    else if (objectValue != null)
    {
      displayValue = objectValue.toString();
    }
View Full Code Here

          Class<?> objectClass = (displayObject == null ? null : displayObject.getClass());

          if ((objectClass != null) && (objectClass != String.class))
          {
            final IConverter converter = getConverter(objectClass);
            displayValue = converter.convertToString(displayObject, getLocale());
          }
          else if (displayObject != null)
          {
            displayValue = displayObject.toString();
          }
View Full Code Here

      // Get label for choice
      String label = "";
      if (objectClass != null && objectClass != String.class)
      {
        IConverter converter = getConverter(objectClass);
        label = converter.convertToString(displayValue, getLocale());
      }
      else if (displayValue != null)
      {
        label = displayValue.toString();
      }
View Full Code Here

    {
      // Get converter
      final IConverter converter = getConverter(modelObject.getClass());

      // Model string from property
      final String modelString = converter.convertToString(modelObject, getLocale());

      if (modelString != null)
      {
        // If we should escape the markup
        if (getFlag(FLAG_ESCAPE_MODEL_STRINGS))
View Full Code Here

      if (locale == null)
      {
        locale = Session.get().getLocale();
      }

      String string = converter.convertToString(result, locale);
      return string;
    }
    else
    {
      return result != null ? result.toString() : null;
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.