|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup
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 FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wicket.Component |
---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor<T extends Component>, Component.VisibilityChange |
Field Summary |
---|
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
FeedbackPanel(java.lang.String id)
|
|
FeedbackPanel(java.lang.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 java.lang.String |
getCSSClass(FeedbackMessage message)
Gets the css class for the given message. |
protected java.util.List<FeedbackMessage> |
getCurrentMessages()
Gets the currently collected messages for this panel. |
boolean |
getEscapeMessages()
Deprecated. use Component.getEscapeModelStrings() instead |
FeedbackMessagesModel |
getFeedbackMessagesModel()
|
IFeedbackMessageFilter |
getFilter()
|
java.util.Comparator<FeedbackMessage> |
getSortingComparator()
|
boolean |
isVersioned()
|
protected FeedbackMessagesModel |
newFeedbackMessagesModel()
Gets a new instance of FeedbackMessagesModel to use. |
protected Component |
newMessageDisplayComponent(java.lang.String id,
FeedbackMessage message)
Generates a component that is used to display the message inside the feedback panel. |
void |
setEscapeMessages(boolean escapeMessages)
Deprecated. use Component.setEscapeModelStrings(boolean) |
FeedbackPanel |
setFilter(IFeedbackMessageFilter filter)
Sets a filter to use on the feedback messages model |
FeedbackPanel |
setMaxMessages(int maxMessages)
|
FeedbackPanel |
setSortingComparator(java.util.Comparator<FeedbackMessage> sortingComparator)
Sets the comparator used for sorting the messages. |
Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
---|
onComponentTag, onComponentTagBody, renderHead |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup |
---|
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getMarkupType, getWebPage, getWebRequest |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FeedbackPanel(java.lang.String id)
Component.Component(String)
public FeedbackPanel(java.lang.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
@Deprecated public final boolean getEscapeMessages()
Component.getEscapeModelStrings()
instead
public final FeedbackMessagesModel getFeedbackMessagesModel()
public final IFeedbackMessageFilter getFilter()
public final java.util.Comparator<FeedbackMessage> getSortingComparator()
public boolean isVersioned()
isVersioned
in class Component
Component.isVersioned()
@Deprecated public final void setEscapeMessages(boolean escapeMessages)
Component.setEscapeModelStrings(boolean)
escapeMessages
- whether model messages should be HTML escapedpublic 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(java.util.Comparator<FeedbackMessage> sortingComparator)
sortingComparator
- comparator used for sorting the messages.
protected java.lang.String getCSSClass(FeedbackMessage message)
message
- the message
protected final java.util.List<FeedbackMessage> getCurrentMessages()
protected FeedbackMessagesModel newFeedbackMessagesModel()
protected Component newMessageDisplayComponent(java.lang.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 |