| Package | Description |
|---|---|
| org.trimou.handlebars | |
| org.trimou.handlebars.i18n |
| Modifier and Type | Class and Description |
|---|---|
class |
BasicSectionHelper |
class |
BasicValueHelper |
class |
BasicHelper
Basic validating helper.
|
class |
EachHelper
{{#each items}}
{{name}}
{{/each}}
|
class |
EmbedHelper
{{embed data.template}}
|
class |
EqualsHelper
Renders a block if the first param does/doesn't equal to the
second param (by means of
Object.equals(Object)). |
class |
IfHelper
Renders a block if the param is not "falsy".
|
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 |
LogHelper
A simple log helper.
|
class |
NullCheckHelper
Renders a block if the param is/isn't null.
|
class |
NumberIsEvenHelper
{{isEven iterIndex "evenRow"}}
{{isEven iterIndex "evenRow" "oddRow"}}
{{#isEven iterIndex}}
... |
class |
NumberIsOddHelper
{{isOdd iterIndex "oddRow"}}
{{isOdd iterIndex "oddRow" "evenRow"}}
{{#isOdd iterIndex}}
... |
class |
NumberMatchingHelper
An abstract helper for matching
Number values. |
class |
SetHelper
Works similarly as
WithHelper except the current
HelperDefinition.getHash() map is pushed on the context stack. |
class |
UnlessHelper
Renders a block if the param is "falsy".
|
class |
WithHelper
Nested context.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DateTimeFormatHelper
This is an alternative to
DateTimeFormatResolver. |
class |
LocaleAwareValueHelper |
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! |
Copyright © 2014. All Rights Reserved.