| 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 |
IfHelper
{{#if item.active}}
{{item.name}}
{{/if}}
|
class |
IsHelper
Renders the second param if the first param is not falsy, or (optionally,
i.e. if set) the third param.
|
class |
NumberIsEvenHelper
{{isEven iterIndex "evenRow"}}
{{isEven iterIndex "evenRow" "oddRow"}}
{{#isEven iterIndex}}
... |
class |
NumberIsOddHelper
{{isOdd iterIndex "oddRow"}}
{{isOdd iterIndex "oddRow" "evenRow"}}
{{#isOdd iterIndex}}
... |
class |
UnlessHelper
Conditionally renders a block if the first parameter 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("msg")).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 Formatter or MessageFormat:
{{msg "my.key" format="printf"}}
See also ResourceBundleHelper.Format for more info about formats. |
Copyright © 2014. All Rights Reserved.