Hi Iñigo, I’ve looked at your project. The array of todo items is converted correctly, and access to the items in the array from JS works as expected. I guess you should have a look at what’s going on inside mustache.js.
Hannes > Am 23.01.2017 um 23:24 schrieb Iñigo Telleria <in...@arima.eu>: > > 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