Package org.apache.wicket.feedback
Class FeedbackCollector
- java.lang.Object
-
- org.apache.wicket.feedback.FeedbackCollector
-
public class FeedbackCollector extends java.lang.ObjectCollects feedback messages from all the places where they can be stored.- Author:
- igor
-
-
Constructor Summary
Constructors Constructor Description FeedbackCollector()Constructs a collector that will only collect messages fromSession.FeedbackCollector(Component component)Constructs a collector that will collect messages from the specifiedcontainerFeedbackCollector(Component component, boolean includeSession)Constructs a collector that will collect messages fromSessionand specifiedcontainer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<FeedbackMessage>collect()Collects all feedback messagesjava.util.List<FeedbackMessage>collect(IFeedbackMessageFilter filter)Collects all feedback messages that match the specifiedfilterFeedbackCollectorsetIncludeSession(boolean value)Controls whether or not feedback from theSessionwill be collected SeeSession.getFeedbackMessages()FeedbackCollectorsetRecursive(boolean value)Controls whether or not feedback will be collected recursively from the descendants of the specified component.protected booleanshouldRecurseInto(Component component)Determines whether or not recursive message collection should continue into the specified component.
-
-
-
Constructor Detail
-
FeedbackCollector
public FeedbackCollector()
Constructs a collector that will only collect messages fromSession. To collect messages from session and components useFeedbackCollector(Component, boolean).
-
FeedbackCollector
public FeedbackCollector(Component component)
Constructs a collector that will collect messages from the specifiedcontainer- Parameters:
component- root component from which feedback will be collected
-
FeedbackCollector
public FeedbackCollector(Component component, boolean includeSession)
Constructs a collector that will collect messages fromSessionand specifiedcontainer- Parameters:
component- root component from which feedback will be collectedincludeSession- controls whether or not feedback from theSessionwill be collected
-
-
Method Detail
-
setIncludeSession
public final FeedbackCollector setIncludeSession(boolean value)
Controls whether or not feedback from theSessionwill be collected SeeSession.getFeedbackMessages()- Parameters:
value-- Returns:
thisfor chaining
-
setRecursive
public final FeedbackCollector setRecursive(boolean value)
Controls whether or not feedback will be collected recursively from the descendants of the specified component.- Parameters:
value-- Returns:
thisfor chaining
-
collect
public final java.util.List<FeedbackMessage> collect()
Collects all feedback messages- Returns:
- a
Listof collected messages
-
collect
public final java.util.List<FeedbackMessage> collect(IFeedbackMessageFilter filter)
Collects all feedback messages that match the specifiedfilter- Parameters:
filter-- Returns:
- a
Listof collected messages
-
shouldRecurseInto
protected boolean shouldRecurseInto(Component component)
Determines whether or not recursive message collection should continue into the specified component. If returningfalsefeedback messages from the specified component nor any of its children will be included.- Parameters:
component-- Returns:
-
-