Thymeleaf: add HTML to th:replace function -


i add html in th:replace function in thymeleaf, so:

<div th:replace="elements/listview :: row (subtext='test<br />test')" ></div> 

my 'listview' template this:

 <div class="listview-row" th:fragment="row">             <span class="listview-subtext" th:if="${subtext != null}" th:utext="${subtext}">              </span>         </div> 

it doesn't compile. of course want compile as:

 <div class="listview-row">             <span class="listview-subtext">                 test<br />test             </span>         </div> 

.. html in place. there way that? thank in advance help.

try this:

<div class="listview-row" th:fragment="row(subtext)">              <span class="listview-subtext" th:if="${subtext != null}" th:utext="${subtext}">                </span>          </div>

and use this:

<div th:replace="elements/listview :: row ('test<br />test')" ></div>


Comments

Popular posts from this blog

PHP while loop dynamic rowspan -

android - How to read a column value in parse.com without accessing an object or a pointer -

timer - Java TimerTask cancel -