org.apache.wicket.feedback
Class FeedbackCollector

java.lang.Object
  extended by org.apache.wicket.feedback.FeedbackCollector

public class FeedbackCollector
extends Object

Collects feedback messages from all the places where they can be stored.

Author:
igor

Constructor Summary
FeedbackCollector()
          Constructs a collector that will only collect messages from Session.
FeedbackCollector(Component component)
          Constructs a collector that will collect messages from Session and specified container
 
Method Summary
 List<FeedbackMessage> collect()
          Collects all feedback messages
 List<FeedbackMessage> collect(IFeedbackMessageFilter filter)
          Collects all feedback messages that match the specified filter
 FeedbackCollector setIncludeSession(boolean value)
          Controls whether or not feedback from the Session will be collected See Session.getFeedbackMessages()
 FeedbackCollector setRecursive(boolean value)
          Controls whether or not feedback will be collected recursively from the descendants of the specified component.
protected  boolean shouldRecurseInto(Component component)
          Determines whether or not recursive message collection should continue into the specified component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeedbackCollector

public FeedbackCollector()
Constructs a collector that will only collect messages from Session. To collect messages from session and components use FeedbackCollector(Component).


FeedbackCollector

public FeedbackCollector(Component component)
Constructs a collector that will collect messages from Session and specified container

Parameters:
component - root component from which feedback will be collected
Method Detail

setIncludeSession

public final FeedbackCollector setIncludeSession(boolean value)
Controls whether or not feedback from the Session will be collected See Session.getFeedbackMessages()

Parameters:
value -
Returns:
this for 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:
this for chaining

collect

public final List<FeedbackMessage> collect()
Collects all feedback messages

Returns:
a List of collected messages

collect

public final List<FeedbackMessage> collect(IFeedbackMessageFilter filter)
Collects all feedback messages that match the specified filter

Parameters:
filter -
Returns:
a List of collected messages

shouldRecurseInto

protected boolean shouldRecurseInto(Component component)
Determines whether or not recursive message collection should continue into the specified component. If returning false feedback messages from the specified component nor any of its children will be included.

Parameters:
component -
Returns:


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.