thymeleaf-spring
thymeleaf-spring copied to clipboard
How to run a processor / dialect after processing with standard Spring dialect is done?
Hi,
I try to implement a dialect. I want to process a <select>
element with given attribute and its body. For this I use AbstractElementModelProcessor
. However, model passed to doProcess
is not (fully?) processed by the standard Spring dialect, i.e. it contains unprocessed th:
attributes.
For the processor I need a value
attribute of <option>
element nested in <select>
, but th:value
is not processed yet.
I tried changing processor and dialect precedence value, but it does not seem to do anything useful for me.
How do I make the processor / dialect be called after standard dialect finishes its processing? The dialect can run in a second pass, I would not especially mind that.
I suppose that, in the example above, I could evaluate th:value
myself, but it does not seem to be a solution, e.g. it will not work in case <option>
elements are generated with <th:each>
.
I use Spring Boot and spring-boot-starter-thymeleaf 2.3.7.RELEASE.
I would appreciate any help.