Class InputDialog<T extends Serializable>

  • Type Parameters:
    T - the type of the model object of the TextField
    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<T,​org.apache.wicket.markup.html.panel.GenericPanel<T>>, 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 InputDialog<T extends Serializable>
    extends AbstractFormDialog<T>
    Provides a modal dialog box that ask an input to the user
    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 Deprecated 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.
      org.apache.wicket.markup.html.form.Form<?> getForm()
      Gets the form to be validated by this dialog.
      Warning, the onSubmit and the onError are being delegated to this dialog.
      org.apache.wicket.model.IModel<String> getLabel()
      Deprecated.
      useless, will be removed
      DialogButton getSubmitButton()
      Gets the button that is in charge to submit the form.
      It should be in the list of buttons returned by AbstractDialog.getButtons()
      boolean isRequired()
      Indicates whether the underlying input is required
      boolean isResizable()
      Indicates whether the dialog is resizable
      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.
      protected org.apache.wicket.markup.html.form.FormComponent<T> newTextField​(String id, org.apache.wicket.model.IModel<T> model)
      Gets a new FormComponent that will be used as an input.
      Override this method when you need to use a IValidator or different input type, e.g.
      protected void onDetach()  
      void onError​(org.apache.wicket.ajax.AjaxRequestTarget target, DialogButton button)
      Triggered when the form is submitted, but the validation failed
      protected void onInitialize()  
      protected void onOpen​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Triggered when the dialog opens
      void setLabel​(org.apache.wicket.model.IModel<String> label)
      Deprecated.
      useless, will be removed
      • 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

      • InputDialog

        public InputDialog​(String id,
                           String title,
                           String label)
        Constructor supplying a new default model.
        Parameters:
        id - the markupId, an html div suffice to host a dialog.
        title - the title of the dialog
        label - text that will be displayed in front of the text field.
      • InputDialog

        public InputDialog​(String id,
                           org.apache.wicket.model.IModel<String> title,
                           org.apache.wicket.model.IModel<String> label)
        Constructor supplying a new default model.
        Parameters:
        id - the markupId, an html div suffice to host a dialog.
        title - the title of the dialog
        label - text that will be displayed in front of the text field.
      • InputDialog

        public InputDialog​(String id,
                           String title,
                           String label,
                           org.apache.wicket.model.IModel<T> model)
        Parameters:
        id - the markupId, an html div suffice to host a dialog.
        title - the title of the dialog
        label - text that will be displayed in front of the text field.
        model - the model to be used
      • InputDialog

        public InputDialog​(String id,
                           org.apache.wicket.model.IModel<String> title,
                           org.apache.wicket.model.IModel<String> label,
                           org.apache.wicket.model.IModel<T> model)
        Parameters:
        id - the markupId, an html div suffice to host a dialog.
        title - the title of the dialog
        label - text that will be displayed in front of the text field.
        model - the model to be used
    • Method Detail

      • 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<T extends Serializable>
        Parameters:
        handler - the IPartialPageRequestHandler
      • getLabel

        @Deprecated
        public org.apache.wicket.model.IModel<String> getLabel()
        Deprecated.
        useless, will be removed
        Sets the text that will be displayed in front of the text field.
        Returns:
        the dialog's label
      • setLabel

        @Deprecated
        public void setLabel​(org.apache.wicket.model.IModel<String> label)
        Deprecated.
        useless, will be removed
        Sets the text that will be displayed in front of the text field.
        Parameters:
        label - the dialog's label
      • getForm

        public org.apache.wicket.markup.html.form.Form<?> getForm()
        Description copied from class: AbstractFormDialog
        Gets the form to be validated by this dialog.
        Warning, the onSubmit and the onError are being delegated to this dialog. However, it does not prevent the use of Form#onSubmit nor Form#onError
        Specified by:
        getForm in class AbstractFormDialog<T extends Serializable>
        Returns:
        the form
      • isRequired

        public boolean isRequired()
        Indicates whether the underlying input is required
        Returns:
        true by default
      • getButtons

        protected 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<T extends Serializable>
        Returns:
        AbstractDialog.btnOk by default
      • 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.
      • newTextField

        protected org.apache.wicket.markup.html.form.FormComponent<T> newTextField​(String id,
                                                                                   org.apache.wicket.model.IModel<T> model)
        Gets a new FormComponent that will be used as an input.
        Override this method when you need to use a IValidator or different input type, e.g. NumberTextField or PasswordField.
        Parameters:
        id - the markup id
        model - the IModel
        Returns:
        the new FormComponent