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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
MOUSE_X_PARAM
static String
MOUSE_Y_PARAM
-
Constructor Summary
Constructors Constructor Description RightClickBehavior(org.apache.wicket.MarkupContainer contextmenu, org.apache.wicket.MarkupContainer componentToUpdate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collapse(org.apache.wicket.ajax.AjaxRequestTarget target)
Close the contextmenuorg.apache.wicket.MarkupContainer
getComponentToUpdate()
org.apache.wicket.MarkupContainer
getContextmenu()
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
-
-
-
-
Field Detail
-
MOUSE_X_PARAM
public static final String MOUSE_X_PARAM
- See Also:
- Constant Field Values
-
MOUSE_Y_PARAM
public static final String MOUSE_Y_PARAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 interfaceorg.apache.wicket.markup.html.IComponentAwareHeaderContributor
- Overrides:
renderHead
in classorg.apache.wicket.ajax.AbstractDefaultAjaxBehavior
-
updateAjaxAttributes
protected void updateAjaxAttributes(org.apache.wicket.ajax.attributes.AjaxRequestAttributes attributes)
- Overrides:
updateAjaxAttributes
in classorg.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 interfaceIContextMenu
-
getContextmenu
public org.apache.wicket.MarkupContainer getContextmenu()
-
getComponentToUpdate
public org.apache.wicket.MarkupContainer getComponentToUpdate()
-
-