Class ContextMenu

    • Field Detail

      • CONTEXTMENU_CSS_CLASS

        public static final String CONTEXTMENU_CSS_CLASS
        CSS class used to identify a Menu. It could be useful to perform some jQuery operation on all menu in the page (hiding for instance)
        See Also:
        Constant Field Values
    • Constructor Detail

      • ContextMenu

        public ContextMenu​(String id)
        Constructor
        Parameters:
        id - the markup id
      • ContextMenu

        public ContextMenu​(String id,
                           List<IMenuItem> items)
        Constructor
        Parameters:
        id - the markup id
        items - the menu-items
      • ContextMenu

        public ContextMenu​(String id,
                           com.googlecode.wicket.jquery.core.Options options)
        Constructor
        Parameters:
        id - the markup id
        options - the Options
      • ContextMenu

        public ContextMenu​(String id,
                           List<IMenuItem> items,
                           com.googlecode.wicket.jquery.core.Options options)
        Constructor
        Parameters:
        id - the markup id
        items - the menu-items
        options - the Options
    • Method Detail

      • getPositionOption

        protected String getPositionOption​(Component component)
        Gets the jQuery UI position option (as JSON-string) that should be applied on the ContextMenu when 'contextmenu' event is triggered
        Parameters:
        component - the Component that fired the 'contextmenu' event
        Returns:
        the jQuery position option (as string)
      • onInitialize

        protected void onInitialize()
        Overrides:
        onInitialize in class Menu
      • newContextMenuDocumentBehavior

        protected com.googlecode.wicket.jquery.core.JQueryAbstractBehavior newContextMenuDocumentBehavior()
        Gets a new JQueryAbstractBehavior that handles the closing of the context-menu
        Returns:
        a JQueryAbstractBehavior