jmix icon indicating copy to clipboard operation
jmix copied to clipboard

Add UI action to render MessageTemplate with selected entities to validate parameters (feature parity with JMIX v1 EmailTemplates)

Open manuelhummler opened this issue 1 month ago • 0 comments

In JMIX v1, the EmailTemplates addon provided a very useful feature: It was possible to send a preview Email to a selected user, to perform a rendering test. Errors were shown immediately, if the parameters were used in a wrong way.

In JMIX v2, the new MessageTemplates addon replaced EmailTemplates, but this validation feature is missing. There is currently no UI way to simply attempt to render the message template and see whether FreeMarker throws an exception or if required parameters are missing.

This makes testing and validating templates much harder, especially when templates depend on dynamic entity parameters.

Requested Feature Please add the ability—directly in the Message Templates UI—to:

  1. Render the selected MessageTemplate in the UI.
  2. Choose one or more selected entities as context data (similar to v1 behavior).
  3. If the template renders successfully → show the rendered result.
  4. If the template fails (missing params, FreeMarker errors, invalid expressions) → show the error message.

Why this is needed

  • Rendering validation is critical for template correctness.
  • Freemarker template errors can only be detected at runtime.
  • v1 allowed validating templates directly in the UI, improving feedback loops.

manuelhummler avatar Nov 19 '25 09:11 manuelhummler