Re: Render a single Enum value

2021-08-27 Thread Dmitry Gusev
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; }

Re: Render a single Enum value

2021-08-27 Thread Nathan Quirynen
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

Re: Render a single Enum value

2021-08-27 Thread Nathan Quirynen
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