public class FeedbackMessagesModel extends Object implements IModel<List<FeedbackMessage>>
Constructor and Description |
---|
FeedbackMessagesModel(Component pageResolvingComponent)
Constructor.
|
FeedbackMessagesModel(Page page,
IFeedbackMessageFilter filter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected List<FeedbackMessage> |
collectMessages(Component pageResolvingComponent,
IFeedbackMessageFilter filter)
Collects feedback messages
|
void |
detach()
Detaches model after use.
|
IFeedbackMessageFilter |
getFilter() |
List<FeedbackMessage> |
getObject()
Gets the model object.
|
Comparator<FeedbackMessage> |
getSortingComparator() |
protected List<FeedbackMessage> |
processMessages(List<FeedbackMessage> messages)
Override this method to post process to the FeedbackMessage list.
|
FeedbackMessagesModel |
setFilter(IFeedbackMessageFilter filter) |
FeedbackMessagesModel |
setIncludeSession(boolean includeSession)
Controls whether or not feedback from the
Session will be collected. |
void |
setObject(List<FeedbackMessage> object)
Sets the model object.
|
FeedbackMessagesModel |
setSortingComparator(Comparator<FeedbackMessage> sortingComparator)
Sets the comparator used for sorting the messages.
|
public FeedbackMessagesModel(Component pageResolvingComponent)
pageResolvingComponent
- The component where the page will be get from for which messages will be displayed
usually the same page as the one feedbackpanel is attached topublic FeedbackMessagesModel(Page page, IFeedbackMessageFilter filter)
filter
- The filter to applypage
- Page for which messages will be displayed - usually the same page as the one
feedbackpanel is attached topublic final IFeedbackMessageFilter getFilter()
public final Comparator<FeedbackMessage> getSortingComparator()
public final List<FeedbackMessage> getObject()
IModel
getObject
in interface IModel<List<FeedbackMessage>>
protected List<FeedbackMessage> collectMessages(Component pageResolvingComponent, IFeedbackMessageFilter filter)
pageResolvingComponent
- filter
- public final FeedbackMessagesModel setFilter(IFeedbackMessageFilter filter)
filter
- Filter to apply to modelpublic final FeedbackMessagesModel setSortingComparator(Comparator<FeedbackMessage> sortingComparator)
sortingComparator
- comparator used for sorting the messagesprotected List<FeedbackMessage> processMessages(List<FeedbackMessage> messages)
messages
- List of sorted and filtered FeedbackMessages for further processingpublic void setObject(List<FeedbackMessage> object)
IModel
setObject
in interface IModel<List<FeedbackMessage>>
object
- The model objectpublic void detach()
IDetachable
detach
in interface IDetachable
detach
in interface IModel<List<FeedbackMessage>>
public FeedbackMessagesModel setIncludeSession(boolean includeSession)
Session
will be collected.
See FeedbackCollector.setIncludeSession(boolean)
and Session.getFeedbackMessages()
value
- Copyright © 2006–2022 Apache Software Foundation. All rights reserved.