Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove weak string dependency for determining template mode nature #167

Closed
danielfernandez opened this issue Jun 11, 2013 · 1 comment
Closed

Comments

@danielfernandez
Copy link
Member

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.

@danielfernandez
Copy link
Member Author

Template modes are specified in Thymeleaf 3.0 as an enum. See #391

Already in 3.0.0-SNAPSHOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant