Package | Description |
---|---|
org.trimou.handlebars | |
org.trimou.handlebars.i18n |
Modifier and Type | Class and Description |
---|---|
class |
EmbedHelper
Embed the template source.
|
class |
FormatHelper
A simple printf-style format helper.
|
class |
IncludeHelper
Works similarly as partial tag except the name of the template to include may
be obtained dynamically.
|
class |
IsHelper
Renders the second param if the first param is not falsy, or (optionally,
i.e. if set) the third param.
|
class |
JoinHelper
This helper takes all the objects specified as the parameters and joins the
Object.toString() values together with the specified delimiter
(optional). |
class |
LogHelper
A simple log helper.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractTimeFormatHelper<F,S>
An abstract time formatting helper.
|
class |
DateTimeFormatHelper
This is an alternative to
DateTimeFormatResolver . |
class |
LocaleAwareValueHelper
An abstract
Locale -aware helper. |
class |
ResourceBundleHelper
First register the helper instance:
MustacheEngineBuilder.newBuilder().registerHelper("msg", new ResourceBundleHelper("messages")).build();
Than use the helper in the template:
{{msg "my.key"}}
The key need not be a string literal:
{{msg foo.key}}
You may also override the default baseName:
{{msg "my.key" baseName="messages"}}
And also use message parameters and Formatter or
MessageFormat :
hello.key=Hello %s! |
class |
TimeFormatHelper
An alternative to
DateTimeFormatHelper which makes use of java.time
package in JDK 8 (JSR-310). |
Copyright © 2017. All rights reserved.