@args List
> items @// The assumption here is that all data rows in the @// incoming items list have the same column set. @returnIf(items == null) @{ Set
columns = Collections.emptySet(); if (items.size() > 0) { columns = items.get(0).keySet(); } }
@for (String column : columns) { @continueIf("mtime".equals(column))
@(column)
}
@for (Map
item : items) {
@for (String column : columns) { @continueIf("mtime".equals(column)) @{ String value = ""; Object o = item.get(column); if (o instanceof java.util.Map) { if (((java.util.Map) o).containsKey("displayLabel")) { value = String.valueOf(((java.util.Map) o).get("displayLabel")); } else if (((java.util.Map) o).containsKey("name")) { value = String.valueOf(((java.util.Map) o).get("name")); } else if (((java.util.Map) o).containsKey("value")) { value = String.valueOf(((java.util.Map) o).get("value")); } } if (o != null && "".equals(value)) { value = o.toString(); } }
@(value)
}
}