|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.Component org.apache.wicket.MarkupContainer org.apache.wicket.markup.html.WebMarkupContainer org.apache.wicket.markup.html.panel.Panel org.apache.wicket.markup.html.panel.FeedbackPanel
public class FeedbackPanel
A panel that displays FeedbackMessage
s in a list view. The
maximum number of messages to show can be set with setMaxMessages().
FeedbackMessage
,
FeedbackMessages
,
Serialized FormField Summary |
---|
Fields inherited from class org.apache.wicket.markup.html.panel.Panel |
---|
PANEL |
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
FeedbackPanel(String id)
|
|
FeedbackPanel(String id,
IFeedbackMessageFilter filter)
|
Method Summary | |
---|---|
boolean |
anyErrorMessage()
Search messages that this panel will render, and see if there is any message of level ERROR or up. |
boolean |
anyMessage()
Search messages that this panel will render, and see if there is any message. |
boolean |
anyMessage(int level)
Search messages that this panel will render, and see if there is any message of the given level. |
protected String |
getCSSClass(FeedbackMessage message)
Gets the css class for the given message. |
protected List<FeedbackMessage> |
getCurrentMessages()
Gets the currently collected messages for this panel. |
FeedbackMessagesModel |
getFeedbackMessagesModel()
|
IFeedbackMessageFilter |
getFilter()
|
Comparator<FeedbackMessage> |
getSortingComparator()
|
boolean |
isVersioned()
|
protected FeedbackMessagesModel |
newFeedbackMessagesModel()
Gets a new instance of FeedbackMessagesModel to use. |
protected Component |
newMessageDisplayComponent(String id,
FeedbackMessage message)
Generates a component that is used to display the message inside the feedback panel. |
FeedbackPanel |
setFilter(IFeedbackMessageFilter filter)
Sets a filter to use on the feedback messages model |
FeedbackPanel |
setMaxMessages(int maxMessages)
|
FeedbackPanel |
setSortingComparator(Comparator<FeedbackMessage> sortingComparator)
Sets the comparator used for sorting the messages. |
Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
---|
newMarkupSourcingStrategy |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FeedbackPanel(String id)
Component.Component(String)
public FeedbackPanel(String id, IFeedbackMessageFilter filter)
id
- filter
- Component.Component(String)
Method Detail |
---|
public final boolean anyErrorMessage()
public final boolean anyMessage()
public final boolean anyMessage(int level)
level
- the level, see FeedbackMessage
public final FeedbackMessagesModel getFeedbackMessagesModel()
public final IFeedbackMessageFilter getFilter()
public final Comparator<FeedbackMessage> getSortingComparator()
public boolean isVersioned()
isVersioned
in class Component
true
if this component should notify its holding page about changes in its
state. If a Page
is not versioned then it wont track changes in its
components and will use the same Page.getPageId()
during its lifetimeComponent.isVersioned()
public final FeedbackPanel setFilter(IFeedbackMessageFilter filter)
filter
- The message filter to install on the feedback messages model
public final FeedbackPanel setMaxMessages(int maxMessages)
maxMessages
- The maximum number of feedback messages that this feedback panel should show at
one time
public final FeedbackPanel setSortingComparator(Comparator<FeedbackMessage> sortingComparator)
sortingComparator
- comparator used for sorting the messages.
protected String getCSSClass(FeedbackMessage message)
message
- the message
protected final List<FeedbackMessage> getCurrentMessages()
protected FeedbackMessagesModel newFeedbackMessagesModel()
protected Component newMessageDisplayComponent(String id, FeedbackMessage message)
span
tags.
By default a Label
is used.
Note that the created component is expected to respect feedback panel's
Component.getEscapeModelStrings()
value
id
- parent idmessage
- feedback message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |