/** * Like {@link #process(Object, Writer)}, but also sets a (XML-)node to be recursively processed by the template. * That node is accessed in the template with <tt>.node</tt>, <tt>#recurse</tt>, etc. See the * <a href="https://freemarker.apache.org/docs/xgui_declarative.html" target="_blank">Declarative XML Processing</a> as a * typical example of recursive node processing. * * @param rootNode The root node for recursive processing or {@code null}. * * @throws TemplateException if an exception occurs during template processing * @throws IOException if an I/O exception occurs during writing to the writer. */ public void process(Object dataModel, Writer out, ObjectWrapper wrapper, TemplateNodeModel rootNode) throws TemplateException, IOException { Environment env = createProcessingEnvironment(dataModel, out, wrapper); if (rootNode != null) { env.setCurrentVisitorNode(rootNode); } env.process(); }
env.setCurrentVisitorNode(docNodeModel); if (prepareEnvironment != null) { Map vars = new HashMap();
/** * Like {@link #process(Object, Writer)}, but also sets a (XML-)node to be recursively processed by the template. * That node is accessed in the template with <tt>.node</tt>, <tt>#recurse</tt>, etc. See the * <a href="https://freemarker.apache.org/docs/xgui_declarative.html" target="_blank">Declarative XML Processing</a> as a * typical example of recursive node processing. * * @param rootNode The root node for recursive processing or {@code null}. * * @throws TemplateException if an exception occurs during template processing * @throws IOException if an I/O exception occurs during writing to the writer. */ public void process(Object dataModel, Writer out, ObjectWrapper wrapper, TemplateNodeModel rootNode) throws TemplateException, IOException { Environment env = createProcessingEnvironment(dataModel, out, wrapper); if (rootNode != null) { env.setCurrentVisitorNode(rootNode); } env.process(); }
/** * Like {@link #process(Object, Writer)}, but also sets a (XML-)node to be recursively processed by the template. * That node is accessed in the template with <tt>.node</tt>, <tt>#recurse</tt>, etc. See the * <a href="https://freemarker.apache.org/docs/xgui_declarative.html" target="_blank">Declarative XML Processing</a> as a * typical example of recursive node processing. * * @param rootNode The root node for recursive processing or {@code null}. * * @throws TemplateException if an exception occurs during template processing * @throws IOException if an I/O exception occurs during writing to the writer. */ public void process(Object dataModel, Writer out, ObjectWrapper wrapper, TemplateNodeModel rootNode) throws TemplateException, IOException { Environment env = createProcessingEnvironment(dataModel, out, wrapper); if (rootNode != null) { env.setCurrentVisitorNode(rootNode); } env.process(); }
env.setCurrentVisitorNode(docNodeModel); if (prepareEnvironment != null) { Map vars = new HashMap();
env.setCurrentVisitorNode(docNodeModel); if (prepareEnvironment != null) { Map vars = new HashMap();
env.setCurrentVisitorNode(docNodeModel); if (prepareEnvironment != null) { Map vars = new HashMap();