/** * Construct. * * @param label Title of the popover * @param body Body of the popover */ public PopoverBehavior(final IModel<String> label, final IModel<String> body) { this(label, body, new PopoverConfig()); }
/** * Construct. * * @param label popover title * @param config popover configuration */ public RichPopoverBehavior(final IModel<String> label, final PopoverConfig config) { super(label, null, config); config.withHtml(true); }
/** * Insert html into the tooltip. If false, jquery's text method * will be used to insert content into the dom. Use text if you're worried about XSS attacks. * * @param value mandatory parameter * @return this instance for chaining. */ public TooltipConfig withHtml(final boolean value) { put(Html, value); return this; }
/** * Construct. * * @param label The tooltip text */ public TooltipBehavior(final IModel<String> label) { this(label, new TooltipConfig()); }
@Override public PopoverConfig withHtml(boolean value) { return (PopoverConfig) super.withHtml(value); } }
@Override public PopoverConfig withSelector(String value) { return (PopoverConfig) super.withSelector(value); }
@Override public PopoverConfig withContent(String value) { return (PopoverConfig) super.withContent(value); }
@Override public PopoverConfig withDelay(Duration value) { return (PopoverConfig) super.withDelay(value); }
@Override public String cssClassName() { return equals(Default) ? "" : "pagination-" + size; } }
@Override public String value() { return name(); } }
public PopoverConfig withHoverTrigger() { return withTrigger(TooltipConfig.OpenTrigger.hover); }
/** * Construct. * * @param label popover title */ public RichPopoverBehavior(final IModel<String> label) { this(label, new PopoverConfig()); }
/** * If a selector is provided, tooltip objects will be delegated to the specified targets. * * @param value mandatory parameter * @return this instance for chaining. */ public TooltipConfig withSelector(final String value) { put(Selector, value); return this; }
/** * default content value if `data-content` attribute isn't present * * @param value mandatory parameter * @return this instance for chaining. */ public TooltipConfig withContent(final String value) { put(Content, value); return this; }
/** * apply a css fade transition to the tooltip * * @param value mandatory parameter * @return this instance for chaining. */ public TooltipConfig withAnimation(final boolean value) { put(Animation, value); return this; }
/** * default title value if `title` tag isn't present * * @param value mandatory parameter * @return this instance for chaining. */ public TooltipConfig withTitle(final String value) { put(Title, value); return this; }