public class FeedbackPanel extends Panel implements IFeedback
FeedbackMessages in a list view. The
maximum number of messages to show can be set with setMaxMessages().FeedbackMessage,
FeedbackMessages,
Serialized FormENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING| Constructor and Description |
|---|
FeedbackPanel(String id) |
FeedbackPanel(String id,
IFeedbackMessageFilter filter) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected ListItem<FeedbackMessage> |
newMessageItem(int index,
IModel<FeedbackMessage> itemModel)
Allows to define the listItem to use in the feedback's message list.
|
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.
|
newMarkupSourcingStrategygetWebPage, getWebRequest, getWebResponse, getWebSessionadd, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onDetach, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdequeue, newDequeueContextpublic FeedbackPanel(String id)
Component.Component(String)public FeedbackPanel(String id, IFeedbackMessageFilter filter)
id - filter - Component.Component(String)public final boolean anyErrorMessage()
public final boolean anyMessage()
public final boolean anyMessage(int level)
level - the level, see FeedbackMessagepublic final FeedbackMessagesModel getFeedbackMessagesModel()
public final IFeedbackMessageFilter getFilter()
public final Comparator<FeedbackMessage> getSortingComparator()
public boolean isVersioned()
isVersioned in class Componenttrue 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 modelpublic final FeedbackPanel setMaxMessages(int maxMessages)
maxMessages - The maximum number of feedback messages that this feedback panel should show at
one timepublic final FeedbackPanel setSortingComparator(Comparator<FeedbackMessage> sortingComparator)
sortingComparator - comparator used for sorting the messages.protected String getCSSClass(FeedbackMessage message)
message - the messageprotected 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() valueid - parent idmessage - feedback messageprotected ListItem<FeedbackMessage> newMessageItem(int index, IModel<FeedbackMessage> itemModel)
index - The index of the itemitemModel - The model object of the itemCopyright © 2006–2014 Apache Software Foundation. All rights reserved.