Class 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:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static 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)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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
    • Field Detail

      • 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:
        Constant Field Values
    • Constructor Detail

      • ContextMenuBehavior

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

      • 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