PlayRythm version history
TODO list
v1.0.0-RC1
break changes
@renderBody()does not render layout content now. It’s used to render tag body specifically. To render the layout content, use@doLayout()or@render()without section name parameter- Automatic escape expression with html format if the template file name suffix is .html. If your code breaks, try to use
@raw()tag to surround relevant template part or export your variable with.raw()extension.- Note auto-escape can cause template execution performance up to 3 times slower (still much faster than groovy) depending on how many expressions there are in your template, but we consider it a good trade-off to offer a secure default behavior. For those people who “need for speed”, simply wrap your entire template content in
rawblock:@raw(){your content comes here}.
- Note auto-escape can cause template execution performance up to 3 times slower (still much faster than groovy) depending on how many expressions there are in your template, but we consider it a good trade-off to offer a secure default behavior. For those people who “need for speed”, simply wrap your entire template content in
app/viewas template root are no longer supported. All rythm template files must be put intoapp/rythmfolderapp/view/tags/rythmas tag root are no longer supported. Just put tag files as normal template file intoapp/rythmfolder@sectiontag usage:- previously
@section sectionName {...} - now
@section(“sectionName”) {...}
- previously
New features
- Tag invocation decorations and chain them together
- Template content decorations and chain them together
- Dynamic tag invocation with @invoke keyword
- Call tag body with parameter
- Include other template inline. And now you can reuse inline tag definitions across multiple views
- Call the current template (self) as a tag using
@thisdirective @extends()directive now has new syntax to specify layout(parent) template- Abort current template executing process and return to caller using
@return - Break the current loop using
@break - Continue the current loop using
@continue - New
Cache4annotation to mark on controller action method @ts()output timestamp in place@__simple__mark the current template as simple template with no implicit variables/imports and does not extend other template- An new demo application with 25 sample cases, with each one has template source and generated java source presented for quick study the Rythm engine
Small enhancements
@verbatim(){}now escape html code@render[Section]()now accept default content/section block- Support
@for(int i = 0; i < 100; ++i)loop style - New alias for Play specific keywords:
@url: previously@_u, url reverse lookup@fullUrl: previously@_au, url reverse lookup with absolute path@msg: previously@_m, i18n message lookup
Issues closed
- https://github.com/greenlaw110/Rythm/issues/6
- https://github.com/greenlaw110/Rythm/issues/21
- https://github.com/greenlaw110/Rythm/issues/14
- https://github.com/greenlaw110/play-rythm/issues/5
- https://github.com/greenlaw110/play-rythm/issues/1
- https://github.com/greenlaw110/play-rythm/pull/11
v0.9.7a
- Add two implicit variables:
_rythmPlugin: the RythmPlugin instance;_rythmthe RythmEngine instance - Add
RythmPlugin.isActionCall()api to allow template author to know whether it is inside a action invocation context
v0.9.7
- Support invoke controller action method in template
v0.9.6c
- Fix bug: Secure layout not found when loading the module directly in project folder instead of installing to play/modules
v0.9.6b
- Fix bug: Java FastTags stop working on v0.96.
v0.9.6a
- Emergency fix to ArgsParser: line breaks stay there which makes the generated html not valid as you have line breaks before <!DOCTYPE html>
v0.9.6
- Error report update to play-2.0 style
- Solve several issues in built-in tag/templates
- Precompile now build all rythm templates (So move templates to app/rythm folder)
@UseRythmTemplateEngineand@UseSystemTemplateEngineannotation are deprecated now- add
@__exitIfNoClass__directive to allow exit parsing process if no certain class exists - bug fix: https://github.com/greenlaw110/Rythm/issues/15
- print out java source if compilation error on prod mode
- bug fix: NPE while scan tags in rare cases
- simplified class reloading logic in
TemplateClassLoader.detectChange(...) - improved template line number report in error reporting
- buf fix: https://github.com/greenlaw110/Rythm/issues/1
- support
{}to enclose tag body - support
@{}to enclose script content. - improved space/line break compact handling, now “//” line will not get merged with the following line
- improved debugging when error happened in the embedded class
v0.9.5b
- Bug fixes
- Add @__exitIfNoClass__ instruction to enable exit from parsing process if no class found
v0.9.5a
- Support app/rythm as view root
- Fix NPE when running in prod mode in rare cases
- template class cache hash calculation take plugin version into consideration
- Now you can call self tag inside that tag
v0.9
- The first public beta release