All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedback, IFeedbackContributor, IConverterLocator, IMetadataContext<Serializable,Component>, IQueueRegion, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable

public class NotificationPanel extends FencedFeedbackPanel
A panel that displays NotificationMessages or FeedbackMessages in a list view. The maximum number of messages to show can be set with FeedbackPanel.setMaxMessages(int).
Author:
miha
See Also:
  • Constructor Details

    • NotificationPanel

      public NotificationPanel(String id)
      Construct.
      Parameters:
      id - The component id
    • NotificationPanel

      public NotificationPanel(String id, Component fence)
      Construct.
      Parameters:
      id - The component id
      fence - The component used as fence
    • NotificationPanel

      public NotificationPanel(String id, IFeedbackMessageFilter filter)
      Construct.
      Parameters:
      id - The component id
      filter - the feedback message filter
    • NotificationPanel

      public NotificationPanel(String id, Component fence, IFeedbackMessageFilter filter)
      Construct.
      Parameters:
      id - The component id
      fence - The component used as fence
      filter - the feedback message filter
  • Method Details

    • showRenderedMessages

      public NotificationPanel showRenderedMessages(boolean showRenderedMessages)
      whether to show already rendered messages or not.
      Parameters:
      showRenderedMessages - true, if rendered messages should be shown
      Returns:
      this instance for chaining
    • hideAfter

      public NotificationPanel 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
    • newFeedbackMessagesModel

      protected FeedbackMessagesModel newFeedbackMessagesModel()
      Overrides:
      newFeedbackMessagesModel in class FencedFeedbackPanel
    • getCSSClass

      protected String getCSSClass(FeedbackMessage message)
      Overrides:
      getCSSClass in class FeedbackPanel
    • newMessageDisplayComponent

      protected Component newMessageDisplayComponent(String markupId, FeedbackMessage message)
      Overrides:
      newMessageDisplayComponent in class FeedbackPanel
    • isCloseButtonVisible

      protected boolean isCloseButtonVisible()
      Returns:
      true if the notification alerts should have close button (x)