1 回答
TA贡献1856条经验 获得超5个赞
可以这样做:
称呼:
<th:block th:include="mailFragments::test('f1', 'f2', 'f3')"/>
分段:
<th:block th:fragment="test(p1,p2,p3)">
<element dialectPrefix:customDialect="|${p1},${p2},${p3}|">тест</element>
</th:block>
和:
new AbstractAttributeTagProcessor(TemplateMode.HTML, PREFIX, null, false, NAME, true, 1000, true) {
@Override
protected void doProcess(final ITemplateContext context, final ProcessableElementTag tag, final AttributeName name, String href, final IElementTagStructureHandler structureHandler) {
final IEngineConfiguration configuration = context.getConfiguration();
final IStandardExpressionParser parser = StandardExpressions.getExpressionParser(configuration);
final IStandardExpression categoryExpression = parser.parseExpression(context, value);
String delimitedResult = categoryExpression.execute(context).toString();
String[] params = delimitedResult.split(",");
.....
}
添加回答
举报