j2html 1.0.0 is here! (May 2017)
j2html 1.0.0 is available for download on Maven Central.
- v1 is officially done. We will be doing semantic versioning from now on.
- All tag methods (
p()etc ) can now accept an arbitrary number of
DomContentas arguments, eliminating the need for
with()in most cases.
- Added a shorthand-attribute overloads to all TagCreator methods:
<div id="id" class="class"></div>
- Added a
join()method to more easily join sentences with inline HTML, like:
join("Added a", code("join()"), "method to more ea...
- Added a
document()method that takes a
html()tag and renders a HTML declaration followed by the html content
- Added support for Java 7 and Java 6. Some functionality (each/filter) will not work on these versions, but everything else should.
j2html 0.99 released! (Apr 2017)
j2html 0.99 is available for download on Maven Central.
- Added generic
iffElse()methods for performing if's in method calls.
withClasses()to add multiple classes to element. Works well with
- HTML-escaping is now a lot faster (and a lot faster than StringUtils)
- Static files can now be fetched from anywhere, not just classpath
j2html 0.88 released! (Jan 2017)
j2html 0.88 is available for download on Maven Central.
- Closure and StringUtils dependencies removed in favor of custom implementations. Most users seem interested in a very lightweight library.
.equals()to Tag-class. Two Tags are equal if they render the same HTML
j2html 0.7 released!
j2html 0.7 is available for download on Maven Central.
- New file-api (avilable from TagCreator class):
- fileAsString(String path)
- returns a file's content as a String (useful for including static HTML such as Google Analytics code)
- fileAsEscapedString(String path)
- returns fileAsString(path) escaped (useful for including the code-examples on this website)
- styleWithInlineFile(String path)
- returns <style>fileAsString(path)</style>
- styleWithInlineFile_min(String path)
- returns <style>fileAsString(path)</style>, minimized using CSSMin
- scriptWithInlineFile(String path)
- returns <script>fileAsString(path)</script>
- scriptWithInlineFile_min(String path)
- returns <script>fileAsString(path)</script>, minimized using Google Closure
- Java 7 support (j2html previously only worked with Java 8)
- Use apache stringutils for escaping
j2html 0.5.0 is on Maven! (Late May 2015)
j2html 0.5.0 is available for download on Maven Central.
We've finished the herculean task of releasing on Maven Central.