Examples of ContextAwareMap


Examples of com.spun.util.velocity.ContextAware.ContextAwareMap

    String template = "#foreach ($row in $commons.asArray($metaData))$row.get()#if (!$row.isLast()),#end#end\r\n"
        + "\r\n"
        + "#foreach ($row in $results)\r\n"
        + "#foreach ($column in $commons.asArray($row))$commons.asExcel($column.get())#if (!$column.isLast()),#end#end \r\n"
        + "\r\n" + "#end ";
    ContextAwareMap map = new ContextAware.ContextAwareMap("metaData", ResultSetWriter.extractMetaData(resultSet));
    map.put("results", ResultSetWriter.extractResults(resultSet));
    String output = VelocityParser.parseString(template, map);
    FileUtils.writeFile(new File(received), output);
    return received;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.