java.lang.Object
de.agilecoders.wicket.core.markup.html.bootstrap.common.NotificationMessage
All Implemented Interfaces:
INotificationMessage, Serializable, IClusterable

public class NotificationMessage extends Object implements INotificationMessage
Default implementation of INotificationMessage.
Author:
miha
See Also:
  • Constructor Details

    • NotificationMessage

      public NotificationMessage(IModel<String> message)
      Construct.
      Parameters:
      message - The feedback message
    • NotificationMessage

      public NotificationMessage(IModel<String> message, IModel<String> header)
      Construct.
      Parameters:
      message - The feedback message
      header - The header of feedback message
    • NotificationMessage

      public NotificationMessage(IModel<String> message, IModel<String> header, boolean inlineHeader)
      Construct.
      Parameters:
      message - The feedback message
      header - The header of feedback message
      inlineHeader - whether to render header and message in same line or not
  • Method Details

    • escapeModelStrings

      public NotificationMessage escapeModelStrings(boolean escapeModelStrings)
      whether to escape model String or not
      Parameters:
      escapeModelStrings - true (default), if model values should be escaped.
      Returns:
      this instance for chaining
    • hideAfter

      public NotificationMessage hideAfter(Duration duration)
      The amount of time to delay before automatically close all feedback messages. If Duration.NONE or value is 0, messages will not automatically close.
      Parameters:
      duration - The amount of time as Duration
      Returns:
      this instance for chaining
    • hideAfter

      public Duration hideAfter()
      Specified by:
      hideAfter in interface INotificationMessage
      Returns:
      The amount of time to delay before automatically close all feedback messages.
    • message

      public IModel<String> message()
      Specified by:
      message in interface INotificationMessage
      Returns:
      the feedback message
    • header

      public IModel<String> header()
      Specified by:
      header in interface INotificationMessage
      Returns:
      the header of feedback message
    • inlineHeader

      public boolean inlineHeader()
      Specified by:
      inlineHeader in interface INotificationMessage
      Returns:
      whether to render header and message in same line or not
    • escapeModelStrings

      public boolean escapeModelStrings()
      Specified by:
      escapeModelStrings in interface INotificationMessage
      Returns:
      whether to escape model String or not
    • toString

      public String toString()
      Overrides:
      toString in class Object