Discussions

News: Thymeleaf published, a new XML/XHTML/HTML5 template engine for Java

  1. Thymeleaf allows you to create XML, XHTML and HTML5 templates like this:

     

    <table>
      <thead>
        <tr>
          <th th:text="#{msgs.headers.name}">Name</td>
          <th th:text="#{msgs.headers.price}">Price</td>
        </tr>
      </thead>
      <tbody>
        <tr th:each="prod : ${allProducts}">
          <td th:text="${prod.name}">Oranges</td>
          <td th:text="${#numbers.formatDecimal(prod.price,1,2)}">0.99</td>
        </tr>
      </tbody>
    </table>

     

    Note the internationalization expressions #{...}, variable evaluations ${...} and even utility functions like #numbers.formatDecimal(...).

    Add to this full (optional) Spring MVC integration including form binding, property editors, validation messages and an intelligent caché system.

    More info at the project website: http://www.thymeleaf.org

    Threaded Messages (1)

  2. performance[ Go to top ]

    Looks good! Is there any performance benchmark comparison against e.g. freemarker? Nevertheless I like its syntax and philosophy.