|
||||||||||
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.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, Component.VisibilityChange |
Field Summary |
---|
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, 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 |
getCurrentMessages()
Gets the currently collected messages for this panel. |
boolean |
getEscapeMessages()
Deprecated. use Component.getEscapeModelStrings() instead |
FeedbackMessagesModel |
getFeedbackMessagesModel()
|
IFeedbackMessageFilter |
getFilter()
|
java.util.Comparator |
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) |
void |
setFilter(IFeedbackMessageFilter filter)
Sets a filter to use on the feedback messages model |
void |
setMaxMessages(int maxMessages)
|
void |
setSortingComparator(java.util.Comparator 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 |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, 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
public final boolean getEscapeMessages()
Component.getEscapeModelStrings()
instead
public final FeedbackMessagesModel getFeedbackMessagesModel()
public final IFeedbackMessageFilter getFilter()
public final java.util.Comparator getSortingComparator()
public boolean isVersioned()
isVersioned
in class Component
Component.isVersioned()
public final void setEscapeMessages(boolean escapeMessages)
Component.setEscapeModelStrings(boolean)
escapeMessages
- whether model messages should be HTML escapedpublic final void setFilter(IFeedbackMessageFilter filter)
filter
- The message filter to install on the feedback messages modelpublic final void setMaxMessages(int maxMessages)
maxMessages
- The maximum number of feedback messages that this feedback panel should show at
one timepublic final void setSortingComparator(java.util.Comparator sortingComparator)
sortingComparator
- comparator used for sorting the messages.protected java.lang.String getCSSClass(FeedbackMessage message)
message
- the message
protected final java.util.List 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 |