Class NotificationDetailViewSupport

java.lang.Object
io.jmix.notificationsflowui.view.NotificationDetailViewSupport

@Component("ntf_NotificationDetailViewSupport") public class NotificationDetailViewSupport extends Object
Utility class to simplify initialization of detail views for InAppNotification entity.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • setupContentTypeSwitch

      public void setupContentTypeSwitch(JmixRadioButtonGroup<ContentType> contentTypeField, JmixTextArea plainField, RichTextEditor htmlField)
      Wires the content-type radio group to swap the visible body field between plain-text and HTML editors in response to user selection.
      Parameters:
      contentTypeField - content-type selector
      plainField - plain-text body field
      htmlField - HTML body field
    • applyBodyFieldsVisibility

      public void applyBodyFieldsVisibility(ContentType contentType, JmixTextArea plainField, RichTextEditor htmlField)
      Shows the body field matching the given content type and hides the other.
      Parameters:
      contentType - content type that determines the visible body field
      plainField - plain-text body field
      htmlField - HTML body field
    • initTypeField

      public void initTypeField(JmixSelect<NotificationType> typeField)
    • onTypeFieldComponentRenderer

      protected com.vaadin.flow.component.Component onTypeFieldComponentRenderer(NotificationType type)
    • onTypeFieldComponentValueChange

      protected void onTypeFieldComponentValueChange(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.select.Select<NotificationType>,NotificationType> event)
    • getLocalizedNotificationType

      protected String getLocalizedNotificationType(@Nullable NotificationType notificationType)