3+ results for '${item.name}' (0 ms)
Not the results you expected?
DynamicPlanItemNameWithRepetitionBasedOnJsonArrayTest.java (https://github.com/flowable/flowable-engine.git) Java · 115 lines
101 // as we don't have the collection yet available, the name must use the expression as fallback without any exception, as the item / itemIndex local
102 // variables are not available on the available plan item instance
103 assertPlanItemInstanceState(planItemInstances, "Task (${item.name} / ${itemIndex} - ${foo})", AVAILABLE);
105 // now kick-off the repetition by setting the collection variable
ThymeleafTest.java (https://github.com/liaoze2010/hutool.git) Java · 99 lines
45 // 字符串模板
46 TemplateEngine engine = new ThymeleafEngine(new TemplateConfig());
47 Template template = engine.getTemplate("<h3 th:each=\"item : ${list}\" th:text=\"${item.name}\"></h3>");
48 String render = template.render(Dict.create().set("list", list));
49 Assert.assertEquals("<h3>a</h3><h3>b</h3><h3>2019-01-01 00:00:00</h3>", render);
82 StringWriter writer = new StringWriter();
83 Context context = new Context(Locale.getDefault(), map);
84 templateEngine.process("<h3 th:each=\"item : ${list}\" th:text=\"${item.name}\"></h3>", context, writer);
86 Assert.assertEquals("<h3>a</h3><h3>b</h3><h3>2019-01-01 00:00:00</h3>", writer.toString());
92 // 字符串模板
93 TemplateEngine engine = new ThymeleafEngine(new TemplateConfig());
94 Template template = engine.getTemplate("<h3 th:each=\"item : ${list}\" th:text=\"${item.name}\"></h3>");
95 // "<h3 th:text=\"${nestMap.nestKey}\"></h3>"
96 String render = template.render(map);