Mustache.js on Nashorn
Iñigo Telleria
inigo at arima.eu
Mon Jan 23 22:24:25 UTC 2017
Hi,
I'm trying to compare the performance of Mustache Java Implementation (
https://github.com/spullara/mustache.java) and Mustache JavaScript (
https://github.com/janl/mustache.js) on JVM. Developing a web application
to compare them, https://github.com/wearearima/mustache-java-js-comparison ,
I've found an issue that I can't solve.
I've got a Todo bean which is a Java class and I want to render it using a
Mustache.js template. If the template receives a Todo object as a simple
param, the value is printed correctly. For example this param works fine
https://github.com/wearearima/mustache-java-js-comparison/blob/master/src/test/java/eu/arima/mustachecomparison/MustacheVersionTests.java#L88
However, when the template receive a Todo list, the values are empty. For
example, this list is rendered with empty values:
https://github.com/wearearima/mustache-java-js-comparison/blob/master/src/test/java/eu/arima/mustachecomparison/MustacheVersionTests.java#L89
I'm not sure if this issue is related to Nashorn engine or Mustache
Javascript framework, because using different versions of Mustache (0.8.2
or 2.3.0) I've got different results. With the lowest version the template
is rendered correctly but not with the highest.
Any advice would be highly appreciated.
Thanks in advance.
Iñigo Telleria
More information about the nashorn-dev
mailing list