Class FeedbackDelay

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.AutoCloseable

    public class FeedbackDelay
    extends java.lang.Object
    implements java.io.Serializable, java.lang.AutoCloseable
    Postpone calling IFeedback.beforeRender() after other components.

    This gives other Component.beforeRender() the possibility to report feedbacks, which can then be collected by IFeedbacks afterwards.

    See Also:
    Serialized Form
    • Constructor Detail

      • FeedbackDelay

        public FeedbackDelay​(RequestCycle cycle)
        Delay all feedbacks for the given cycle.

        All postponed feedbacks will be prepared for render with beforeRender().

        Parameters:
        cycle - request cycle
    • Method Detail

      • get

        public static java.util.Optional<FeedbackDelay> get​(RequestCycle cycle)
        Get the current delay.
        Parameters:
        cycle -
        Returns:
        optional delay
      • beforeRender

        public void beforeRender()
        Prepares all postponed feedbacks for render.
        See Also:
        IFeedback.beforeRender()
      • close

        public void close()
        Close any delays.

        This does not call beforeRender() on the delayed feedbacks.

        Specified by:
        close in interface java.lang.AutoCloseable