1 16 17 package org.springframework.beans.propertyeditors; 18 19 import java.beans.PropertyEditorSupport ; 20 21 import org.springframework.util.StringUtils; 22 23 35 public class LocaleEditor extends PropertyEditorSupport { 36 37 public void setAsText(String text) { 38 setValue(StringUtils.parseLocaleString(text)); 39 } 40 41 public String getAsText() { 42 Object value = getValue(); 43 return (value != null ? value.toString() : ""); 44 } 45 46 } 47 | Popular Tags |