Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

78612: Fix PropertyFieldProcessor, committed by mistake


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82623 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Erik Winlof
2014-09-03 12:46:28 +00:00
parent af3480e728
commit 77e7de5626

View File

@@ -31,7 +31,6 @@ import java.util.Set;
import org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint;
import org.alfresco.repo.dictionary.constraint.RegisteredConstraint;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.repo.forms.Field;
import org.alfresco.repo.forms.FieldGroup;
import org.alfresco.repo.forms.PropertyFieldDefinition;
@@ -167,15 +166,7 @@ public class PropertyFieldProcessor extends QNameFieldProcessor<PropertyDefiniti
PropertyDefinition propDef = data.getPropertyDefinition(name);
if (propDef != null)
{
QName typeQName = propDef.getDataType().getName();
String strDefaultValue = propDef.getDefaultValue();
if (PropertyValue.isDataTypeSupported(typeQName))
{
// convert to the appropriate type
PropertyValue pv = new PropertyValue(typeQName, strDefaultValue);
return pv.getValue(typeQName);
}
return strDefaultValue;
return propDef.getDefaultValue();
}
return null;
}