Class MessageFormDialog

  • 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

    public abstract class MessageFormDialog
    extends AbstractFormDialog<String>
    Provides a modal dialog box that displays a specific message, with a predefined icon and a predefined button set.
    Note: MessageDialog & MessageFormDialog are sharing the same code, they just does not extend the same class.
    Author:
    Sebastien Briquet - sebfz1
    See Also:
    Serialized Form
    • 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 org.apache.wicket.markup.html.panel.Panel

        PANEL
      • Fields 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected List<DialogButton> getButtons()
      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.Component newLabel​(String id, org.apache.wicket.model.IModel<String> model)
      Gets a new Component that will be used as a label in the dialog.
      Override this method when you need to show formatted label.
      void onClose​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler, DialogButton button)
      Triggered when the dialog closes.
      protected void onInitialize()  
      protected void onOpen​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Triggered when the dialog opens
      • Methods inherited from class org.apache.wicket.markup.html.panel.Panel

        getRegionMarkup, newMarkupSourcingStrategy
      • Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer

        getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
      • Methods 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, visitChildren
      • Methods 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, getMetaData, 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, 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, wrap
      • Methods inherited from interface org.apache.wicket.IGenericComponent

        getDefaultModel, getDefaultModelObject, getModel, getModelObject, setDefaultModel, setDefaultModelObject, setModel, setModelObject
      • Methods inherited from interface org.apache.wicket.IQueueRegion

        dequeue, newDequeueContext
    • Constructor Detail

      • MessageFormDialog

        public MessageFormDialog​(String id,
                                 String title,
                                 String message,
                                 DialogButtons buttons)
        Constructor.
        Parameters:
        id - the markup id, an html div suffice to host a dialog.
        title - the title of the dialog
        message - the message to be displayed
        buttons - button set to be displayed
      • MessageFormDialog

        public MessageFormDialog​(String id,
                                 String title,
                                 String message,
                                 List<DialogButton> buttons)
        Constructor.
        Parameters:
        id - the markup id, an html div suffice to host a dialog.
        title - the title of the dialog
        message - the message to be displayed
        buttons - list of buttons to be displayed
      • MessageFormDialog

        public MessageFormDialog​(String id,
                                 String title,
                                 String message,
                                 DialogButtons buttons,
                                 DialogIcon icon)
        Constructor.
        Parameters:
        id - the markup id, an html div suffice to host a dialog.
        title - the title of the dialog
        message - the message to be displayed
        buttons - button set to be displayed
        icon - the predefined icon to display
      • MessageFormDialog

        public MessageFormDialog​(String id,
                                 String title,
                                 String message,
                                 List<DialogButton> buttons,
                                 DialogIcon icon)
        Constructor.
        Parameters:
        id - the markup id, an html div suffice to host a dialog.
        title - the title of the dialog
        message - the message to be displayed
        buttons - list of buttons to be displayed
        icon - the predefined icon to display
      • MessageFormDialog

        public MessageFormDialog​(String id,
                                 org.apache.wicket.model.IModel<String> title,
                                 org.apache.wicket.model.IModel<String> message,
                                 DialogButtons buttons)
        Constructor.
        Parameters:
        id - the markup id, an html div suffice to host a dialog.
        title - the title of the dialog
        message - the message to be displayed
        buttons - button set to be displayed
      • MessageFormDialog

        public MessageFormDialog​(String id,
                                 org.apache.wicket.model.IModel<String> title,
                                 org.apache.wicket.model.IModel<String> message,
                                 List<DialogButton> buttons)
        Constructor.
        Parameters:
        id - the markup id, an html div suffice to host a dialog.
        title - the title of the dialog
        message - the message to be displayed
        buttons - list of buttons to be displayed
      • MessageFormDialog

        public MessageFormDialog​(String id,
                                 org.apache.wicket.model.IModel<String> title,
                                 org.apache.wicket.model.IModel<String> message,
                                 DialogButtons buttons,
                                 DialogIcon icon)
        Constructor.
        Parameters:
        id - the markup id, an html div suffice to host a dialog.
        title - the title of the dialog
        message - the message to be displayed
        buttons - button set to be displayed
        icon - the predefined icon to display
      • MessageFormDialog

        public MessageFormDialog​(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 markup id, an html div suffice to host a dialog.
        title - the title of the dialog
        message - the message to be displayed
        buttons - list of buttons to be displayed
        icon - the predefined icon to display
    • Method Detail

      • getButtons

        protected final List<DialogButton> getButtons()
        Description copied from class: AbstractDialog
        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.
        Overrides:
        getButtons in class AbstractDialog<String>
        Returns:
        AbstractDialog.btnOk by default
      • onOpen

        protected void onOpen​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
        Description copied from class: AbstractDialog
        Triggered when the dialog opens
        Overrides:
        onOpen in class AbstractDialog<String>
        Parameters:
        handler - the IPartialPageRequestHandler
      • onClose

        public void onClose​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler,
                            DialogButton button)
        Description copied from interface: IDialogListener
        Triggered when the dialog closes.
        Specified by:
        onClose in interface IDialogListener
        Overrides:
        onClose in class AbstractFormDialog<String>
        Parameters:
        handler - the IPartialPageRequestHandler
        button - the button that closed the dialog
      • newLabel

        protected org.apache.wicket.Component newLabel​(String id,
                                                       org.apache.wicket.model.IModel<String> model)
        Gets a new Component that will be used as a label in the dialog.
        Override this method when you need to show formatted label.
        Parameters:
        id - the markup id
        model - the label IModel
        Returns:
        the new label component.