문제

Can mustache loop over a java Map? My object:

Map<Integer, String> mapTest

Tried this in my mustache template:

{{#mapTest}}
  {{.}}
{{/mapTest}}

That spits out a string representation (mapTest.toString()) of the entire object but doesn't loop at all.


Update: In hunting through the source I'm getting closer but still not sure how to do it. https://github.com/scalate/scalate/blob/ec981338c067fcf37106fb5f3bdf2fa8c4e458ca/scalate-core/src/main/scala/org/fusesource/scalate/mustache/Scope.scala#L124-125

도움이 되었습니까?

해결책

See this answer on the mailing list...

http://groups.google.com/group/scalate/msg/100df004001d84f0

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top