List contents not loaded

"krishnan.1000" <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hi,

I am trying to generate a postscript file using a freemarker. The list is
iterated as such

72 560 moveto
/rule
(____________________________________________________________________________)
def
/y 550 def /x 72 def
y -20 20 { x exch moveto rule show } for
(<#list comments as comment>${comment}</#list>) rule stringwidth pop {
 x y 1 add moveto show /y y 15 sub def
} BreakIntoLines

To set up data model. 
Map<String, Object> root = new HashMap<String, Object>();
root.put("comments", this.comments);

The file does not load the list content at all. But if I were to write to
the file directly,

BufferedWriter bw = new BufferedWriter(new FileWriter("file.txt"));
bw.write(writeComments().toString());

where 

private StringBuffer generateComments() {   
    StringBuffer buffer = new StringBuffer();
    buffer.append("/rule
(___________________________________________________");
    buffer.append("_________________________) def\n");
    buffer.append("/y 550 def /x 72 def\n");
    buffer.append("y -20 20 { x exch moveto rule show } for\n");
    buffer.append("(");
    if (this.comments != null && !this.comments.isEmpty()) {
      for (String comment : this.comments) {
        if (StringUtils.isBlank(comment)) {
          continue;
        }
        comment = StringUtils.replace(comment, "(", "\\(");
        comment = StringUtils.replaceChars(comment, ")", "\\)");
        comment = StringUtils.replaceChars(comment, "\\", "\\\\");
        buffer.append(comment).append("\n");
      }
    }
    buffer.append(") rule stringwidth pop {\n");
    buffer.append("x y 1 add moveto show /y y 20 sub def\n");
    buffer.append("} BreakIntoLines\n").append("grestore\n");
    return buffer;
  }

works. Is there anything that I am doing in the ftl file. Please help?
-- 
View this message in context: http://www.nabble.com/List-contents-not-loaded-tp16291547p16291547.html
Sent from the freemarker-user mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.