public class Alert extends org.apache.wicket.markup.html.panel.GenericPanel<String>
add(new Alert("id", Model.of("message text")));
| Modifier and Type | Class and Description |
|---|---|
static class |
Alert.Type
The
Type enum defines all possible alert types. |
| Constructor and Description |
|---|
Alert(String id,
org.apache.wicket.model.IModel<String> message)
Constructor.
|
Alert(String id,
org.apache.wicket.model.IModel<String> message,
org.apache.wicket.model.IModel<String> header)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.wicket.Component |
createMessage(String markupId,
org.apache.wicket.model.IModel<String> message)
creates a new message component.
|
Alert |
hideAfter(org.apache.wicket.util.time.Duration duration)
hides the alert box after given duration.
|
protected void |
onComponentTag(org.apache.wicket.markup.ComponentTag tag) |
protected void |
onConfigure() |
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response) |
Alert |
setCloseButtonVisible(boolean visible)
Sets whether the close button is visible.
|
Alert |
type(Alert.Type type)
Sets the alert type.
|
Alert |
useInlineHeader(boolean useInlineHeader)
Whether to use an inline or block header.
|
Alert |
withHeader(org.apache.wicket.model.IModel<String> header)
Sets the header message.
|
Alert |
withMessage(org.apache.wicket.model.IModel<String> message)
Sets the message.
|
getModel, getModelObject, setModel, setModelObjectgetWebPage, getWebRequest, getWebResponse, getWebSessionadd, 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, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, 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, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onDetach, onEvent, onInitialize, 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, wrappublic Alert(String id, org.apache.wicket.model.IModel<String> message)
id - the wicket component id.message - the alert messageprotected void onComponentTag(org.apache.wicket.markup.ComponentTag tag)
onComponentTag in class org.apache.wicket.Componentprotected org.apache.wicket.Component createMessage(String markupId, org.apache.wicket.model.IModel<String> message)
markupId - The component idmessage - The message as IModelpublic Alert setCloseButtonVisible(boolean visible)
visible - True if the close button is visible.public void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead in interface org.apache.wicket.markup.html.IHeaderContributorrenderHead in class org.apache.wicket.Componentpublic Alert withMessage(org.apache.wicket.model.IModel<String> message)
message - The message.public Alert withHeader(org.apache.wicket.model.IModel<String> header)
header - The header message.public Alert type(Alert.Type type)
type - to use.public Alert hideAfter(org.apache.wicket.util.time.Duration duration)
duration - the duration to use for closing the alert boxpublic Alert useInlineHeader(boolean useInlineHeader)
useInlineHeader - true to use inline headerprotected void onConfigure()
onConfigure in class org.apache.wicket.ComponentCopyright © 2013 agilecoders.de. All Rights Reserved.