mybatis/thymeleaf-scripting

Support dynamic indexed access on mb:p tag

Closed this issue · 0 comments

We support dynamic indexed access(e.g. ids[${idStat.index}]) to the collection object on mb:p tag as follow:

SELECT * FROM names
  WHERE 1 = 1
  /*[# th:if="${not #lists.isEmpty(ids)}"]*/
    AND id IN (
    /*[# th:each="id : ${ids}"]*/
      /*[# mb:p="ids[${idStat.index}]"]*/ 1 /*[/]*/
      /*[(${idStat.last} ? '' : ',')]*/
    /*[/]*/
    )
  /*[/]*/
  ORDER BY id