Class CustomTooltipBehavior

  • All Implemented Interfaces:
    JQueryDestroyListener.IDestroyable, Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable

    public abstract class CustomTooltipBehavior
    extends TooltipBehavior
    Provides the jQuery tooltip behavior, with custom content.

    Warning: there is no selector supplied to the constructor, but it does not means that this behavior will be applied to the document, like for the TooltipBehavior. The selector will be retrieved from the component this behavior will be bound to, because this is a mandatory condition.
    Since:
    6.12.0
    Author:
    Sebastien Briquet - sebfz1
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior

        method, options, selector
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected String $()  
      void bind​(org.apache.wicket.Component component)  
      protected abstract org.apache.wicket.markup.html.WebMarkupContainer newContent​(String markupId)
      Gets the WebMarkupContainer which will represent the tooltip content
      protected String quote​(String content)
      Quotes (and escapes) the content
      Warning: override with care
      • Methods inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior

        $, $, $, beforeRender, detach, getMethod, getOption, getOptions, getSelector, off, on, on, register, remove, renderHead, setOption, setOption, setOption, setOptions, setSelector
      • Methods inherited from class com.googlecode.wicket.jquery.core.JQueryAbstractBehavior

        add, getJQueryLibrarySettings, renderOnDomReadyScript, renderPriorityHeaderItem, toString
      • Methods inherited from class org.apache.wicket.behavior.Behavior

        afterRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onEvent, onException, onRemove, onTag, unbind
    • Constructor Detail

      • CustomTooltipBehavior

        public CustomTooltipBehavior()
        Constructor
      • CustomTooltipBehavior

        public CustomTooltipBehavior​(com.googlecode.wicket.jquery.core.Options options)
        Constructor
        Parameters:
        options - the Options
    • Method Detail

      • bind

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

        protected abstract org.apache.wicket.markup.html.WebMarkupContainer newContent​(String markupId)
        Gets the WebMarkupContainer which will represent the tooltip content
        Parameters:
        markupId - the markup id to be used
        Returns:
        a new WebMarkupContainer
      • quote

        protected String quote​(String content)
        Quotes (and escapes) the content
        Warning: override with care
        Parameters:
        content - the content, likely html
        Returns:
        the quoted content