Class MessageTemplatesPreviewer
java.lang.Object
io.jmix.messagetemplatesflowui.view.messagetemplatepreview.MessageTemplatesPreviewer
@Component("msgtmp_MessageTemplatesPreviewer")
public class MessageTemplatesPreviewer
extends Object
Provides functionality for previewing
MessageTemplate.
Allows users to enter parameters used for generating a message preview and displays the result in a dialog.
This is an internal component and is not intended for direct use in application code.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidshowPreview(View<?> origin, MessageTemplate messageTemplate) Opens a preview for the specified message template.protected voidshowTemplate(MessageTemplate template, Map<String, Object> parameters, View<?> origin) Generates the message template using the provided parameters and displays the result in the preview dialog.
-
Field Details
-
messageTemplatesGenerator
-
dialogWindows
-
-
Constructor Details
-
MessageTemplatesPreviewer
public MessageTemplatesPreviewer()
-
-
Method Details
-
showPreview
Opens a preview for the specified message template.If the template contains parameters, a dialog for parameter input is shown first. After confirmation, the template is generated and the result is displayed.
- Parameters:
origin- the originating view used to open dialogsmessageTemplate- the message template
-
showTemplate
protected void showTemplate(MessageTemplate template, Map<String, Object> parameters, View<?> origin) Generates the message template using the provided parameters and displays the result in the preview dialog.- Parameters:
template- the message templateparameters- parameters used for generationorigin- the originating view
-