Thanks for the quick help,
On Wednesday, January 27, 2016 at 5:28:10 PM UTC+1, mcdan wrote:
> I think you want to use this:
>
>
> {{this.val}}
> {{#each subDum}}
> {{this.val}}
> {{/each}}
Sadly it still does not behave like I expected. With the same setup as before,
Template template = handlebars.compileInline("{{#this}}"
+ "{{this.val}}"
+ "{{#each SubDum}}{{this.val}}{{/each}}"
+ "{{/this}}");
gives
d1d2
instead of
d1d3d2d4
>
>
> Looks your #this and #SubDum is getting ignored because those are block helpers that don't appear to be registered in your example, unless you have more code. I'm a bit suprised you aren't seeing a compile error but not looking at the code for handlebars.java right now.
I think I don't get a compile error because #this and #subDum are actually mustache and not handlebars (see
http://jknack.github.io/handlebars.java/gettingStarted.html when #each is presented)
Nevertheless, I have made some headway, I had a mistake on my original template (#SubDum instead of #subDum) however, having fixed that, I now get
d1d3d2
which is still not what I wanted, but at least it mimics the behavior I am seeing in my actual code (which is that the second iteration is skipped)
Any other ideas?
Carlos.