return makeMapAdapter((Map) anObject);
else if (anObject instanceof Iterator)
return makeIteratorAdapter((Iterator) anObject);
+ else if (anObject instanceof List)
+ return makeIteratorAdapter(((List) anObject).iterator());
else
throw new TemplateModelException("Unadaptable class: " + anObject.getClass().getName());
}
if (!valuesCache.containsKey(aKey)) {
Object value = map.get(aKey);
- if (value == null)
- throw new TemplateModelException("MapAdapter: no key "+aKey+" available");
+// ML: this unfortunately doesn't work, because the entity doesn't seem to store
+// fields with null values
+// if (value == null && !map.containsKey(aKey))
+// throw new TemplateModelException("MapAdapter: no key "+aKey+" available");
valuesCache.put(aKey, makeAdapter(value));
}