Class AbstractWindow<T>

  • Type Parameters:
    T - the type of the model object
    All Implemented Interfaces:
    com.googlecode.wicket.jquery.core.IJQueryWidget, IWindowListener, 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
    Direct Known Subclasses:
    Window

    public abstract class AbstractWindow<T>
    extends org.apache.wicket.markup.html.panel.GenericPanel<T>
    implements com.googlecode.wicket.jquery.core.IJQueryWidget, IWindowListener
    Base class for implementing Kendo UI windows
    Since:
    6.17.0
    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 
      Modifier and Type Field Description
      protected static String ACTION_CLOSE  
      protected static String ACTION_CUSTOM  
      protected static String ACTION_MAXIMIZE  
      protected static String ACTION_MINIMIZE  
      protected static String ACTION_PIN  
      protected static String ACTION_REFRESH  
      • 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, RFLAG_CONTAINER_HAS_REMOVALS
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Closes the window in ajax.
      String getTitle()
      Gets the window's title
      org.apache.wicket.model.IModel<String> getTitleModel()
      Gets the window's title
      int getWidth()
      Gets the window's with
      boolean isActionEventEnabled()
      Indicates whether the action events are enabled.
      If true, the IWindowListener.onAction(AjaxRequestTarget, String) event will be triggered
      boolean isCentered()
      Indicates whether the window is centered
      boolean isCloseEventEnabled()
      Indicates whether the close event is enabled.
      boolean isModal()
      Gets the modal flag
      boolean isResizable()
      Indicates whether the window is resizable
      WindowBehavior newWidgetBehavior​(String selector)  
      void onAction​(org.apache.wicket.ajax.AjaxRequestTarget target, String action)
      Triggered when an action button is clicked.
      void onBeforeRender​(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)  
      void onClose​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Triggered when then the Window closes, either trough the 'X' icon or the 'escape' key (IWindowListener.isCloseEventEnabled() should return true), or if close(IPartialPageRequestHandler) has been called
      void onConfigure​(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)  
      protected void onInitialize()  
      protected void onOpen​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Triggered when the window opens
      void open​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Opens the window in ajax.
      void setTitle​(String title)
      Sets the window's title
      void setTitle​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler, String title)
      Sets the window's title dynamically
      void setTitleModel​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler, org.apache.wicket.model.IModel<String> model)
      Sets the window's title dynamically
      void setTitleModel​(org.apache.wicket.model.IModel<String> model)
      Sets the window's title
      String widget()
      Gets the Kendo UI widget
      • 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, onDetach, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, 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, 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, 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

      • AbstractWindow

        public AbstractWindow​(String id,
                              String title)
        Constructor
        Parameters:
        id - the markup id, an html div suffice to host a window.
        title - the title of the window
      • AbstractWindow

        public AbstractWindow​(String id,
                              org.apache.wicket.model.IModel<String> title)
        Constructor
        Parameters:
        id - the markup id, an html div suffice to host a window.
        title - the title of the window
      • AbstractWindow

        public AbstractWindow​(String id,
                              String title,
                              org.apache.wicket.model.IModel<T> model)
        Constructor
        Parameters:
        id - the markup id, an html div suffice to host a window.
        title - the title of the window
        model - the model to be used in the window.
      • AbstractWindow

        public AbstractWindow​(String id,
                              org.apache.wicket.model.IModel<String> title,
                              org.apache.wicket.model.IModel<T> model)
        Constructor
        Parameters:
        id - the markup id, an html div suffice to host a window.
        title - the title of the window
        model - the model to be used in the window.
      • AbstractWindow

        public AbstractWindow​(String id,
                              String title,
                              boolean modal)
        Constructor
        Parameters:
        id - the markup id, an html div suffice to host a window.
        title - the title of the window
        modal - indicates whether the window is modal
      • AbstractWindow

        public AbstractWindow​(String id,
                              org.apache.wicket.model.IModel<String> title,
                              boolean modal)
        Constructor
        Parameters:
        id - the markup id, an html div suffice to host a window.
        title - the title of the window
        modal - indicates whether the window is modal
      • AbstractWindow

        public AbstractWindow​(String id,
                              String title,
                              org.apache.wicket.model.IModel<T> model,
                              boolean modal)
        Constructor
        Parameters:
        id - the markup id, an html div suffice to host a window.
        title - the title of the window
        modal - indicates whether the window is modal
        model - the model to be used in the window
      • AbstractWindow

        public AbstractWindow​(String id,
                              org.apache.wicket.model.IModel<String> title,
                              org.apache.wicket.model.IModel<T> model,
                              boolean modal)
        Constructor
        Parameters:
        id - the markup id, an html div suffice to host a window.
        title - the title of the window
        modal - indicates whether the window is modal
        model - the model to be used in the window
    • Method Detail

      • widget

        public String widget()
        Gets the Kendo UI widget
        Returns:
        the jQuery object
      • open

        public final void open​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
        Opens the window in ajax.
        Parameters:
        handler - the IPartialPageRequestHandler
      • close

        public final void close​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
        Closes the window in ajax.
        Parameters:
        handler - the IPartialPageRequestHandler
      • getWidth

        public int getWidth()
        Gets the window's with
        Returns:
        WIDTH by default
      • getTitle

        public String getTitle()
        Gets the window's title
        Returns:
        the window's title
      • setTitle

        public void setTitle​(String title)
        Sets the window's title
        Parameters:
        title - the window's title
      • setTitle

        public void setTitle​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler,
                             String title)
        Sets the window's title dynamically
        Parameters:
        handler - the IPartialPageRequestHandler
        title - the window's title
      • getTitleModel

        public org.apache.wicket.model.IModel<String> getTitleModel()
        Gets the window's title
        Returns:
        the window's title
      • setTitleModel

        public void setTitleModel​(org.apache.wicket.model.IModel<String> model)
        Sets the window's title
        Parameters:
        model - the window's title
      • setTitleModel

        public void setTitleModel​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler,
                                  org.apache.wicket.model.IModel<String> model)
        Sets the window's title dynamically
        Parameters:
        handler - the IPartialPageRequestHandler
        model - the window's title
      • isModal

        public final boolean isModal()
        Gets the modal flag
        Returns:
        the modal flag supplied to the constructor by default
      • isCentered

        public boolean isCentered()
        Indicates whether the window is centered
        Returns:
        true by default
      • isResizable

        public boolean isResizable()
        Indicates whether the window is resizable
        Returns:
        false by default
        See Also:
        WindowBehavior.isCentered()
      • onInitialize

        protected void onInitialize()
        Overrides:
        onInitialize in class org.apache.wicket.MarkupContainer
      • onConfigure

        public void onConfigure​(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
        Specified by:
        onConfigure in interface com.googlecode.wicket.jquery.core.IJQueryWidget
      • onBeforeRender

        public void onBeforeRender​(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
        Specified by:
        onBeforeRender in interface com.googlecode.wicket.jquery.core.IJQueryWidget
      • onOpen

        protected void onOpen​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
        Triggered when the window opens
        Parameters:
        handler - the IPartialPageRequestHandler
      • onAction

        public void onAction​(org.apache.wicket.ajax.AjaxRequestTarget target,
                             String action)
        Description copied from interface: IWindowListener
        Triggered when an action button is clicked.
        Specified by:
        onAction in interface IWindowListener
        Parameters:
        target - the AjaxRequestTarget
        action - the action that fired the event
      • newWidgetBehavior

        public WindowBehavior newWidgetBehavior​(String selector)
        Specified by:
        newWidgetBehavior in interface com.googlecode.wicket.jquery.core.IJQueryWidget
        See Also:
        IJQueryWidget.newWidgetBehavior(String)