freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/FreemarkerProcessor.java
1.1 --- a/freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/FreemarkerProcessor.java Sun Aug 30 14:37:47 2009 +0200
1.2 +++ b/freemarkerdor/src/main/java/cz/xelfi/quoridor/freemarkerdor/FreemarkerProcessor.java Mon Aug 31 22:44:47 2009 +0200
1.3 @@ -41,6 +41,7 @@
1.4 import javax.script.ScriptException;
1.5 import javax.ws.rs.ext.Provider;
1.6 import org.openide.filesystems.FileUtil;
1.7 +import org.w3c.dom.Document;
1.8
1.9 /**
1.10 *
1.11 @@ -68,7 +69,11 @@
1.12 if (model instanceof Map) {
1.13 bind.putAll((Map<? extends String, ? extends Object>)model);
1.14 }
1.15 - bind.put("model", model);
1.16 + if (model instanceof Document) {
1.17 + bind.put("doc", model);
1.18 + } else {
1.19 + bind.put("model", model);
1.20 + }
1.21
1.22 Writer w = new OutputStreamWriter(out);
1.23