Class RightClickBehavior

java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.behavior.AbstractAjaxBehavior
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
org.hippoecm.frontend.plugins.yui.rightclick.RightClickBehavior
All Implemented Interfaces:
Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.IRequestListener, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable, IContextMenu

public abstract class RightClickBehavior extends org.apache.wicket.ajax.AbstractDefaultAjaxBehavior implements IContextMenu
This behavior adds a right-click event-handler to the component.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior

    INDICATOR
  • Constructor Summary

    Constructors
    Constructor
    Description
    RightClickBehavior(org.apache.wicket.MarkupContainer contextmenu, org.apache.wicket.MarkupContainer componentToUpdate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    collapse(org.apache.wicket.ajax.AjaxRequestTarget target)
    Close the contextmenu
    org.apache.wicket.MarkupContainer
     
    org.apache.wicket.MarkupContainer
     
    void
    renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)
    Set up a YUI 'contextmenu' event listener on the component.
    protected void
    updateAjaxAttributes(org.apache.wicket.ajax.attributes.AjaxRequestAttributes attributes)
     

    Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior

    findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, onBind, onMethodMismatch, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes, respond

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

    afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind

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

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.wicket.IRequestListener

    rendersPage
  • Field Details

  • Constructor Details

    • RightClickBehavior

      public RightClickBehavior(org.apache.wicket.MarkupContainer contextmenu, org.apache.wicket.MarkupContainer componentToUpdate)
  • Method Details

    • renderHead

      public void renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)
      Set up a YUI 'contextmenu' event listener on the component. The callback function is parameterized with the x&y coordinates of the click event. Also stop the contextmenu event from propagating to prevent the browser's contextmenu from rendering.
      Specified by:
      renderHead in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributor
      Overrides:
      renderHead in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
    • updateAjaxAttributes

      protected void updateAjaxAttributes(org.apache.wicket.ajax.attributes.AjaxRequestAttributes attributes)
      Overrides:
      updateAjaxAttributes in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
    • collapse

      public void collapse(org.apache.wicket.ajax.AjaxRequestTarget target)
      Description copied from interface: IContextMenu
      Close the contextmenu
      Specified by:
      collapse in interface IContextMenu
    • getContextmenu

      public org.apache.wicket.MarkupContainer getContextmenu()
    • getComponentToUpdate

      public org.apache.wicket.MarkupContainer getComponentToUpdate()