Example usage for org.springframework.beans.propertyeditors StringTrimmerEditor StringTrimmerEditor

List of usage examples for org.springframework.beans.propertyeditors StringTrimmerEditor StringTrimmerEditor

Introduction

In this page you can find the example usage for org.springframework.beans.propertyeditors StringTrimmerEditor StringTrimmerEditor.

Prototype

public StringTrimmerEditor(String charsToDelete, boolean emptyAsNull) 

Source Link

Document

Create a new StringTrimmerEditor.

Usage

From source file:ru.mystamps.web.controller.SeriesController.java

@InitBinder("addSeriesForm")
protected void initBinder(WebDataBinder binder) {
    StringTrimmerEditor editor = new StringTrimmerEditor(" ", true);
    binder.registerCustomEditor(String.class, "michelNumbers", editor);
    binder.registerCustomEditor(String.class, "scottNumbers", editor);
    binder.registerCustomEditor(String.class, "yvertNumbers", editor);
    binder.registerCustomEditor(String.class, "gibbonsNumbers", editor);
    binder.registerCustomEditor(String.class, "comment", new StringTrimmerEditor(true));
}