Class DialogBehavior

  • All Implemented Interfaces:
    com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware, JQueryDestroyListener.IDestroyable, Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable

    public abstract class DialogBehavior
    extends JQueryUIBehavior
    implements com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
    Provides a jQuery dialog behavior.
    Since:
    1.2.3, 6.0.1
    Author:
    Sebastien Briquet - sebfz1
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String METHOD  
      • Fields inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior

        method, options, selector
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(org.apache.wicket.Component component)  
      void close​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Closes the dialogs in ajax.
      protected abstract List<DialogButton> getButtons()
      Gets the dialog's buttons.
      protected abstract ButtonAjaxBehavior newButtonAjaxBehavior​(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source, DialogButton button)
      Gets a new ButtonAjaxBehavior that will be called by the corresponding DialogButton.
      protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnDefaultCloseAjaxBehavior​(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
      Gets a new JQueryAjaxBehavior that will be wired to the 'close' event, triggered when the user clicks on the X-icon
      protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnEscapeCloseAjaxBehavior​(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
      Gets a new JQueryAjaxBehavior that will be wired to the 'beforeClose' event, triggered when the user presses the escape key
      void onAjax​(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)  
      void onConfigure​(org.apache.wicket.Component component)  
      void open​(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Opens the dialogs in ajax.
      • Methods inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior

        $, $, $, $, beforeRender, detach, getMethod, getOption, getOptions, getSelector, off, on, on, register, remove, renderHead, setOption, setOption, setOption, setOptions, setSelector
      • Methods inherited from class com.googlecode.wicket.jquery.core.JQueryAbstractBehavior

        add, getJQueryLibrarySettings, renderOnDomReadyScript, renderPriorityHeaderItem, toString
      • Methods inherited from class org.apache.wicket.behavior.Behavior

        afterRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onEvent, onException, onRemove, onTag, unbind
    • Constructor Detail

      • DialogBehavior

        public DialogBehavior​(String selector,
                              IDialogListener listener)
        Constructor
        Parameters:
        selector - the html selector (ie: "#myId")
        listener - the IDialogListener
      • DialogBehavior

        public DialogBehavior​(String selector,
                              com.googlecode.wicket.jquery.core.Options options,
                              IDialogListener listener)
        Constructor
        Parameters:
        selector - the html selector (ie: "#myId")
        options - the Options
        listener - the IDialogListener
    • Method Detail

      • bind

        public void bind​(org.apache.wicket.Component component)
        Overrides:
        bind in class org.apache.wicket.behavior.Behavior
      • open

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

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

        public void onAjax​(org.apache.wicket.ajax.AjaxRequestTarget target,
                           com.googlecode.wicket.jquery.core.JQueryEvent event)
        Specified by:
        onAjax in interface com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
      • newOnDefaultCloseAjaxBehavior

        protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnDefaultCloseAjaxBehavior​(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
        Gets a new JQueryAjaxBehavior that will be wired to the 'close' event, triggered when the user clicks on the X-icon
        Parameters:
        source - the IJQueryAjaxAware
        Returns:
        a new OnDefaultCloseAjaxBehavior by default
      • newOnEscapeCloseAjaxBehavior

        protected com.googlecode.wicket.jquery.core.ajax.JQueryAjaxBehavior newOnEscapeCloseAjaxBehavior​(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
        Gets a new JQueryAjaxBehavior that will be wired to the 'beforeClose' event, triggered when the user presses the escape key
        Parameters:
        source - the IJQueryAjaxAware
        Returns:
        a new OnEscapeCloseAjaxBehavior by default