Шаблонные вызовы в блоках <сценария> не допускаютсяJAVA

Программисты JAVA общаются здесь
Anonymous
Шаблонные вызовы в блоках <сценария> не допускаются

Сообщение Anonymous »

Я использую механизм шаблона JTE в рамках проекта Spring-Boot и должен включить шаблон в тег:

Код: Выделить всё

@template.pages.json-ld(product = product)

jte не разрешает это и бросает следующее исключение с вызовами шаблона сообщения в блоки не разрешено.

Код: Выделить всё

gg.jte.TemplateException: Failed to compile pages/product.jte, error at line 16: Template calls in  blocks are not allowed.
at gg.jte.compiler.java.JavaCodeGenerator.onError(JavaCodeGenerator.java:228) ~[jte-3.1.16.jar:na]
at gg.jte.compiler.TemplateParser.doParse(TemplateParser.java:248) ~[jte-3.1.16.jar:na]
at gg.jte.compiler.TemplateParser.parse(TemplateParser.java:85) ~[jte-3.1.16.jar:na]
at gg.jte.compiler.java.JavaCodeGenerator$JavaContentProcessor.onContentBlock(JavaCodeGenerator.java:610) ~[jte-3.1.16.jar:na]
at gg.jte.compiler.ContentProcessor.handleContentBlock(ContentProcessor.java:69) ~[jte-3.1.16.jar:na]
at gg.jte.compiler.ContentProcessor.process(ContentProcessor.java:40) ~[jte-3.1.16.jar:na]
at gg.jte.compiler.java.JavaCodeGenerator.writeJavaCodeWithContentSupport(JavaCodeGenerator.java:486) ~[jte-3.1.16.jar:na]
at gg.jte.compiler.java.JavaCodeGenerator.appendParam(JavaCodeGenerator.java:549) ~[jte-3.1.16.jar:na]
Есть ли обходной путь для этого?

Подробнее здесь: https://stackoverflow.com/questions/797 ... ot-allowed

Вернуться в «JAVA»