1 17 package org.apache.geronimo.common.propertyeditor; 18 19 import java.text.DateFormat ; 20 import java.text.ParseException ; 21 22 27 public class DateEditor extends TextPropertyEditorSupport { 28 34 public Object getValue() { 35 try { 36 DateFormat formatter = DateFormat.getDateInstance(); 41 return formatter.parse(getAsText().trim()); 42 } catch (ParseException e) { 43 throw new PropertyEditorException(e); 45 } 46 } 47 } 48 | Popular Tags |