Closed GoogleCodeExporter closed 8 years ago
Similarly, there are other lines that need to be updated.
System.out.println(simpleTofu.render(".helloName", new SoyMapData("name",
"Ana"), null));
Should be:
System.out.println(simpleTofu.newRenderer(".helloName")
.setData(new SoyMapData("name", "Ana"))
.render());
System.out.println(
simpleTofu.render(".helloNames",
new SoyMapData("name", "Ana",
"additionalNames", new SoyListData("Bob", "Cid", "Dee")),
null));
Should be:
System.out.println(
simpleTofu.newRenderer(".helloNames")
.setData(new SoyMapData("name", "Ana",
"additionalNames", new SoyListData("Bob", "Cid", "Dee")))
.render());
Original comment by bmcc...@google.com
on 29 Aug 2011 at 2:07
Might also be worth mentioning that the following is also valid:
System.out.println(simpleTofu.newRenderer(".helloName")
.setData(ImmutableMap.of("name", "Ana"))
.render());
System.out.println(
simpleTofu.newRenderer(".helloNames")
.setData(ImmutableMap.of("name", "Ana",
"additionalNames", ImmutableList.of("Bob", "Cid", "Dee")))
.render());
Original comment by bmcc...@google.com
on 29 Aug 2011 at 2:17
Oops, take it back. Turns out the newRenderer syntax is available only
internally. Maybe it's time for a new release?
Original comment by bmcc...@google.com
on 29 Aug 2011 at 2:42
Original comment by kai.hu...@gmail.com
on 20 Sep 2011 at 12:09
Original issue reported on code.google.com by
bmcc...@google.com
on 29 Aug 2011 at 2:01