You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.0.18 introduced the org.thymeleaf.util.TemplateModeUtil class, which includes methods for determining whether a template mode is used for HTML or for XML rendering.
This helps in, for example, determining how attributes like multiple, selected, etc. should be rendered (multiple="multiple" in HTML, multiple="something" in XML).
But this is too dependent on a weak mechanism like String comparison (checking whether a word like XML is contained in the template name).
A good solution seems to modify the ITemplateModeHandler, adding some kind of method that can expose the nature of the template mode.
The text was updated successfully, but these errors were encountered:
2.0.18 introduced the
org.thymeleaf.util.TemplateModeUtil
class, which includes methods for determining whether a template mode is used for HTML or for XML rendering.This helps in, for example, determining how attributes like
multiple
,selected
, etc. should be rendered (multiple="multiple"
in HTML,multiple="something"
in XML).But this is too dependent on a weak mechanism like String comparison (checking whether a word like
XML
is contained in the template name).A good solution seems to modify the
ITemplateModeHandler
, adding some kind of method that can expose the nature of the template mode.The text was updated successfully, but these errors were encountered: