Class MessageDialog
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.GenericPanel<T>
com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog<String>
com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog
- All Implemented Interfaces:
com.googlecode.wicket.jquery.core.IJQueryWidget,IDialogListener,Serializable,Iterable<org.apache.wicket.Component>,org.apache.wicket.event.IEventSink,org.apache.wicket.event.IEventSource,org.apache.wicket.feedback.IFeedbackContributor,org.apache.wicket.IConverterLocator,org.apache.wicket.IGenericComponent<String,,org.apache.wicket.markup.html.panel.GenericPanel<String>> org.apache.wicket.IMetadataContext<Serializable,,org.apache.wicket.Component> org.apache.wicket.IQueueRegion,org.apache.wicket.markup.html.IHeaderContributor,org.apache.wicket.request.component.IRequestableComponent,org.apache.wicket.util.IHierarchical<org.apache.wicket.Component>,org.apache.wicket.util.io.IClusterable
Provides a modal dialog box that displays a specific message, with a predefined icon and a predefined button set.
Note:
Note:
MessageDialog & MessageFormDialog are sharing the same code, they just do not extend the same class.- Author:
- Sebastien Briquet - sebfz1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.googlecode.wicket.jquery.core.IJQueryWidget
com.googlecode.wicket.jquery.core.IJQueryWidget.JQueryWidget -
Field Summary
Fields inherited from class com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog
CANCEL, CLOSE, LBL_CANCEL, LBL_CLOSE, LBL_NO, LBL_OK, LBL_SUBMIT, LBL_YES, NO, OK, SUBMIT, YESFields inherited from class org.apache.wicket.markup.html.panel.Panel
PANELFields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS -
Constructor Summary
ConstructorsConstructorDescriptionMessageDialog(String id, String title, String message, DialogButtons buttons) Constructor.MessageDialog(String id, String title, String message, DialogButtons buttons, DialogIcon icon) Constructor.MessageDialog(String id, String title, String message, List<DialogButton> buttons) Constructor.MessageDialog(String id, String title, String message, List<DialogButton> buttons, DialogIcon icon) Constructor.MessageDialog(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<String> message, DialogButtons buttons) Constructor.MessageDialog(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<String> message, DialogButtons buttons, DialogIcon icon) Constructor.MessageDialog(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<String> message, List<DialogButton> buttons) Constructor.MessageDialog(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<String> message, List<DialogButton> buttons, DialogIcon icon) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected final List<DialogButton>Gets the dialog's buttons.
It is allowed to return a predefined list (ie: DialogButtons#OK_CANCEL#toList()) as long as the buttons state (enable and/or visible) are not modified
Warning: It is not legal to create the buttons to be returned in this method.protected org.apache.wicket.ComponentGets a newComponentthat will be used as a label in the dialog.
Override this method when you need to show formatted label.protected voidprotected voidonOpen(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Triggered when the dialog opensMethods inherited from class com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog
close, findButton, getTitle, getWidth, isDefaultCloseEventEnabled, isEscapeCloseEventEnabled, isModal, isResizable, newButtonAjaxBehavior, newDialogListenerWrapper, newWidgetBehavior, onBeforeRender, onClick, onConfigure, onDetach, open, setTitle, setTitle, setTitleMethods inherited from class org.apache.wicket.markup.html.panel.Panel
getRegionMarkup, newMarkupSourcingStrategyMethods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSessionMethods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildrenMethods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, 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, getMarkupTag, 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, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.googlecode.wicket.jquery.ui.widget.dialog.IDialogListener
onCloseMethods inherited from interface org.apache.wicket.IGenericComponent
getDefaultModel, getDefaultModelObject, getModel, getModelObject, setDefaultModel, setDefaultModelObject, setModel, setModelObjectMethods inherited from interface org.apache.wicket.IQueueRegion
dequeue, newDequeueContextMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MessageDialog
Constructor.- Parameters:
id- the markupId, an html div suffice to host a dialog.title- the title of the dialogmessage- the message to be displayedbuttons- button set to be displayed
-
MessageDialog
Constructor.- Parameters:
id- the markupId, an html div suffice to host a dialog.title- the title of the dialogmessage- the message to be displayedbuttons- list of buttons to be displayed
-
MessageDialog
public MessageDialog(String id, String title, String message, DialogButtons buttons, DialogIcon icon) Constructor.- Parameters:
id- the markupId, an html div suffice to host a dialog.title- the title of the dialogmessage- the message to be displayedbuttons- button set to be displayedicon- the predefined icon to display
-
MessageDialog
public MessageDialog(String id, String title, String message, List<DialogButton> buttons, DialogIcon icon) Constructor.- Parameters:
id- the markupId, an html div suffice to host a dialog.title- the title of the dialogmessage- the message to be displayedbuttons- list of buttons to be displayedicon- the predefined icon to display
-
MessageDialog
public MessageDialog(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<String> message, DialogButtons buttons) Constructor.- Parameters:
id- the markupId, an html div suffice to host a dialog.title- the title of the dialogmessage- the message to be displayedbuttons- button set to be displayed
-
MessageDialog
public MessageDialog(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<String> message, List<DialogButton> buttons) Constructor.- Parameters:
id- the markupId, an html div suffice to host a dialog.title- the title of the dialogmessage- the message to be displayedbuttons- list of buttons to be displayed
-
MessageDialog
public MessageDialog(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<String> message, DialogButtons buttons, DialogIcon icon) Constructor.- Parameters:
id- the markupId, an html div suffice to host a dialog.title- the title of the dialogmessage- the message to be displayedbuttons- button set to be displayedicon- the predefined icon to display
-
MessageDialog
public MessageDialog(String id, org.apache.wicket.model.IModel<String> title, org.apache.wicket.model.IModel<String> message, List<DialogButton> buttons, DialogIcon icon) Constructor.- Parameters:
id- the markupId, an html div suffice to host a dialog.title- the title of the dialogmessage- the message to be displayedbuttons- list of buttons to be displayedicon- the predefined icon to display
-
-
Method Details
-
getButtons
Description copied from class:AbstractDialogGets the dialog's buttons.
It is allowed to return a predefined list (ie: DialogButtons#OK_CANCEL#toList()) as long as the buttons state (enable and/or visible) are not modified
Warning: It is not legal to create the buttons to be returned in this method.- Overrides:
getButtonsin classAbstractDialog<String>- Returns:
AbstractDialog.btnOkby default
-
onInitialize
protected void onInitialize()- Overrides:
onInitializein classAbstractDialog<String>
-
onOpen
protected void onOpen(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Description copied from class:AbstractDialogTriggered when the dialog opens- Overrides:
onOpenin classAbstractDialog<String>- Parameters:
handler- theIPartialPageRequestHandler
-
newLabel
protected org.apache.wicket.Component newLabel(String id, org.apache.wicket.model.IModel<String> model) Gets a newComponentthat will be used as a label in the dialog.
Override this method when you need to show formatted label.- Parameters:
id- the markup idmodel- the labelIModel- Returns:
- the new label component.
-