Class ContextMenuBehavior

java.lang.Object
org.apache.wicket.behavior.Behavior
com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
com.googlecode.wicket.jquery.ui.widget.menu.ContextMenuBehavior
All Implemented Interfaces:
com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware, Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable

public class ContextMenuBehavior extends com.googlecode.wicket.jquery.core.JQueryAbstractBehavior implements com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
Provides a jQuery context menu behavior.
A ContextMenuBehavior can be associated to only one Component (ie: The behavior cannot be reused).
Since:
6.2.8
Author:
Sebastien Briquet - sebfz1
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
    Provides an event object that will be broadcasted by the ContextMenuBehavior.OnContextMenuAjaxBehavior callback
    static class 
    Provides a JQueryAjaxBehavior that aims to be wired to the 'contextmenu' event
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    CSS class used to identify the component that invoke the context menu, in order to avoid events conflict (with the registered click in ContextMenu)
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    $()
     
    void
    bind(org.apache.wicket.Component component)
     
    void
    onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)
     

    Methods inherited from class com.googlecode.wicket.jquery.core.JQueryAbstractBehavior

    add, getJQueryLibrarySettings, renderHead, renderOnDomReadyScript, renderPriorityHeaderItem, toString

    Methods inherited from class org.apache.wicket.behavior.Behavior

    afterRender, beforeRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onConfigure, onEvent, onException, onRemove, onTag, unbind

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • INVOKER_CSS_CLASS

      public static final String INVOKER_CSS_CLASS
      CSS class used to identify the component that invoke the context menu, in order to avoid events conflict (with the registered click in ContextMenu)
      See Also:
  • Constructor Details

    • ContextMenuBehavior

      public ContextMenuBehavior(ContextMenu menu)
      Constructor
      Parameters:
      menu - the ContextMenu that should be displayed
  • Method Details

    • bind

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

      protected String $()
      Specified by:
      $ in class com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
    • 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