NIHVIVO-564 Work on dump directive
This commit is contained in:
parent
83938a2c19
commit
b9ac586c20
5 changed files with 27 additions and 12 deletions
|
@ -11,6 +11,7 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHelper;
|
|||
import freemarker.core.Environment;
|
||||
import freemarker.template.Configuration;
|
||||
import freemarker.template.SimpleDate;
|
||||
import freemarker.template.SimpleHash;
|
||||
import freemarker.template.SimpleScalar;
|
||||
import freemarker.template.SimpleSequence;
|
||||
import freemarker.template.TemplateBooleanModel;
|
||||
|
@ -66,7 +67,8 @@ public class DumpDirective implements TemplateDirectiveModel {
|
|||
type = "boolean";
|
||||
} else if (val instanceof SimpleSequence){
|
||||
includeTemplate = "dump-array.ftl";
|
||||
type = "array";
|
||||
} else if (val instanceof SimpleHash) {
|
||||
includeTemplate = "dump-hash.ftl";
|
||||
} else {
|
||||
includeTemplate = "dump-string.ftl";
|
||||
value = value.toString();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue