Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » propertyeditors » [javadoc | source]
org.springframework.beans.propertyeditors
public class: StringTrimmerEditor [javadoc | source]
java.lang.Object
   java.beans.PropertyEditorSupport
      org.springframework.beans.propertyeditors.StringTrimmerEditor

All Implemented Interfaces:
    PropertyEditor

Property editor that trims Strings.

Optionally allows transforming an empty string into a null value. Needs to be explictly registered, e.g. for command binding.

Constructor:
 public StringTrimmerEditor(boolean emptyAsNull) 
 public StringTrimmerEditor(String charsToDelete,
    boolean emptyAsNull) 
    Create a new StringTrimmerEditor.
    Parameters:
    charsToDelete - a set of characters to delete, in addition to trimming an input String. Useful for deleting unwanted line breaks: e.g. "\r\n\f" will delete all new lines and line feeds in a String.
    emptyAsNull - true if an empty String is to be transformed into null
Method from org.springframework.beans.propertyeditors.StringTrimmerEditor Summary:
getAsText,   setAsText
Methods from java.beans.PropertyEditorSupport:
addPropertyChangeListener,   firePropertyChange,   getAsText,   getCustomEditor,   getJavaInitializationString,   getSource,   getTags,   getValue,   isPaintable,   paintValue,   removePropertyChangeListener,   setAsText,   setSource,   setValue,   supportsCustomEditor
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.propertyeditors.StringTrimmerEditor Detail:
 public String getAsText() 
 public  void setAsText(String text)