private boolean isACombo(PropertyEditorFieldInfo field) { return field.getType().equals(PropertyEditorType.COMBO); }
public PropertyEditorType getPropertyEditorType(PropertyFormType propertyFormType) { return PropertyEditorType.valueOf(propertyFormType.name()); }
/** * Create a PropertyEditorFieldInfo * * @param label field descriptor * @param type Property Editor Type of this field */ public PropertyEditorFieldInfo(String label, PropertyEditorType type) { this.label = checkNotNull("label", label); this.originalValue = currentStringValue; this.type = checkNotNull("type", type); this.validators.addAll(type.getValidators()); }
private void extractFieldInformationAndValues(Class targetClass, PropertyEditorCategory beanCategory, Object instance) throws ErrorReadingFieldInformationAndValues { for (Field declaredField : targetClass.getDeclaredFields()) { PropertyEditorType type = PropertyEditorType.getFromType(declaredField.getType()); if (isAHandledType(type)) { PropertyEditorFieldInfo field = createPropertyEditorInfo(instance, declaredField, type); if (isACombo(field)) { generateComboValues(declaredField, field); } beanCategory.withField(field); } } }
public static PropertyEditorFieldType getFieldTypeFrom(PropertyEditorFieldInfo fieldInfo) { return PropertyEditorFieldType.valueOf(fieldInfo.getType().name()); }
/** * Create a PropertyEditorFieldInfo * * @param label field descriptor * @param type Property Editor Type of this field */ public PropertyEditorFieldInfo(String label, PropertyEditorType type) { this.label = checkNotNull("label", label); this.originalValue = currentStringValue; this.type = checkNotNull("type", type); this.validators.addAll(type.getValidators()); }
private void extractFieldInformationAndValues(Class targetClass, PropertyEditorCategory beanCategory, Object instance) throws ErrorReadingFieldInformationAndValues { for (Field declaredField : targetClass.getDeclaredFields()) { PropertyEditorType type = PropertyEditorType.getFromType(declaredField.getType()); if (isAHandledType(type)) { PropertyEditorFieldInfo field = createPropertyEditorInfo(instance, declaredField, type); if (isACombo(field)) { generateComboValues(declaredField, field); } beanCategory.withField(field); } } }
/** * Create a PropertyEditorFieldInfo * * @param label field descriptor * @param type Property Editor Type of this field * @param currentStringValue Current value of this field */ public PropertyEditorFieldInfo(String label, String currentStringValue, PropertyEditorType type) { this.label = checkNotNull("label", label); this.currentStringValue = checkNotNull("currentStringValue", currentStringValue); this.originalValue = currentStringValue; this.type = checkNotNull("type", type); this.validators.addAll(type.getValidators()); }
public PropertyEditorType getPropertyEditorType(PropertyFormType propertyFormType) { return PropertyEditorType.valueOf(propertyFormType.name()); }
private boolean isACombo(PropertyEditorFieldInfo field) { return field.getType().equals(PropertyEditorType.COMBO); }
/** * Create a PropertyEditorFieldInfo * * @param label field descriptor * @param type Property Editor Type of this field * @param currentStringValue Current value of this field */ public PropertyEditorFieldInfo(String label, String currentStringValue, PropertyEditorType type) { this.label = checkNotNull("label", label); this.currentStringValue = checkNotNull("currentStringValue", currentStringValue); this.originalValue = currentStringValue; this.type = checkNotNull("type", type); this.validators.addAll(type.getValidators()); }