mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for document list not returning data (e.g. when tag property is null)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29215 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -232,24 +232,27 @@ public final class ApplicationScriptUtils extends BaseScopableProcessorExtension
|
|||||||
String key = useShortQNames ? shortQName : nextLongQName.toString();
|
String key = useShortQNames ? shortQName : nextLongQName.toString();
|
||||||
Serializable value = properties.get(nextLongQName);
|
Serializable value = properties.get(nextLongQName);
|
||||||
|
|
||||||
// Has a decorator has been registered for this property?
|
if (value != null)
|
||||||
if (this.decoratedProperties.containsKey(shortQName))
|
|
||||||
{
|
{
|
||||||
json.put(key, ((JSONPropertyDecorator) this.decoratedProperties.get(shortQName)).decorate(nodeRef, shortQName, value));
|
// Has a decorator has been registered for this property?
|
||||||
}
|
if (this.decoratedProperties.containsKey(shortQName))
|
||||||
else
|
|
||||||
{
|
|
||||||
// Built-in data type processing
|
|
||||||
if (value instanceof Date)
|
|
||||||
{
|
{
|
||||||
Map<String, Serializable> dateObj = new LinkedHashMap<String, Serializable>(1);
|
json.put(key, ((JSONPropertyDecorator) this.decoratedProperties.get(shortQName)).decorate(nodeRef, shortQName, value));
|
||||||
dateObj.put("value", value);
|
|
||||||
dateObj.put("iso8601", ISO8601DateFormat.format((Date)value));
|
|
||||||
json.put(key, (Serializable)dateObj);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
json.put(key, value);
|
// Built-in data type processing
|
||||||
|
if (value instanceof Date)
|
||||||
|
{
|
||||||
|
Map<String, Serializable> dateObj = new LinkedHashMap<String, Serializable>(1);
|
||||||
|
dateObj.put("value", value);
|
||||||
|
dateObj.put("iso8601", ISO8601DateFormat.format((Date)value));
|
||||||
|
json.put(key, (Serializable)dateObj);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
json.put(key, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user