Package org.apache.wicket.feedback
Class FeedbackDelay
- java.lang.Object
-
- org.apache.wicket.feedback.FeedbackDelay
-
- All Implemented Interfaces:
Serializable
,AutoCloseable
public class FeedbackDelay extends Object implements Serializable, AutoCloseable
Postpone callingIFeedback.beforeRender()
after other components.This gives other
Component.beforeRender()
the possibility to report feedbacks, which can then be collected byIFeedback
s afterwards.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FeedbackDelay(RequestCycle cycle)
Delay all feedbacks for the given cycle.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beforeRender()
Prepares all postponed feedbacks for render.void
close()
Close any delays.static Optional<FeedbackDelay>
get(RequestCycle cycle)
Get the current delay.FeedbackDelay
postpone(IFeedback feedback)
PostponeComponent.beforeRender()
on the given feedback.
-
-
-
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 Optional<FeedbackDelay> get(RequestCycle cycle)
Get the current delay.- Parameters:
cycle
-- Returns:
- optional delay
-
postpone
public FeedbackDelay postpone(IFeedback feedback)
PostponeComponent.beforeRender()
on the given feedback.- Parameters:
feedback
-- Returns:
-
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 interfaceAutoCloseable
-
-