1 24 package org.riotfamily.common.beans; 25 26 import java.beans.PropertyEditor ; 27 28 import org.springframework.beans.PropertyEditorRegistrySupport; 29 30 37 public class DefaultPropertyEditorRegistry 38 extends PropertyEditorRegistrySupport { 39 40 public DefaultPropertyEditorRegistry() { 41 registerDefaultEditors(); 42 } 43 44 public PropertyEditor findEditor(Class requiredType) { 45 return findEditor(requiredType, null); 46 } 47 48 public PropertyEditor findEditor(Class requiredType, String propertyPath) { 49 PropertyEditor pe = findCustomEditor(requiredType, propertyPath); 50 if (pe == null) { 51 pe = getDefaultEditor(requiredType); 52 } 53 return pe; 54 } 55 56 } 57 | Popular Tags |