You could build a custom component, e.g.:
public class OutputEnum
{
@Inject
private Messages messages;
@Parameter(required = true)
private Enum value;
@BeginRender
void begin(MarkupWriter writer)
{
if (value == null)
{
return;
}
If you want a reusable solution, you could contribute your own custom
binding prefix, so you can use the following in your .tml files:
${enum:object.enumValue}
And then in your .properties message files:
EnumName.ENUM=Enum message
1. Extend the AbstractBinding class: (maybe it can
Or if you want a more global easy to use solution, you could contribute
your own custom binding prefix, so you can use the following in your
.tml files:
${enum:object.enumValue}
And then in your .properties message files:
EnumName.ENUM=Enum message
1. Extend the AbstractBinding