/** * 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); }
public static Component getJEXLPopover( final Component caller, final TooltipConfig.Placement placement, final String... jexlExamples) { StringBuilder body = new StringBuilder(caller.getString("jexl_info")). append("<ul>"); for (String jexlExample : jexlExamples) { body.append("<li>").append(jexlExample).append("</li>"); } body.append("</ul>"). append("<a href='https://commons.apache.org/proper/commons-jexl/reference/' "). append("target='_blank' rel='noopener noreferrer'>"). append(caller.getString("jexl_syntax_url")). append("</a>"); return new Label("jexlInfo", Model.of()).add(new PopoverBehavior( Model.<String>of(), Model.of(body.toString()), new PopoverConfig().withHtml(true).withPlacement(placement)) { private static final long serialVersionUID = -7867802555691605021L; @Override protected String createRelAttribute() { return "jexlInfo"; } }); }
public FieldPanel<T> setTitle(final String title, final boolean html) { this.title = title; field.add(new PopoverBehavior( Model.<String>of(), title == null ? Model.<String>of() : Model.of(title), new PopoverConfig().withHtml(html).withHoverTrigger().withPlacement( index.getObject() != null && index.getObject() == 0 ? TooltipConfig.Placement.bottom : this instanceof AjaxCheckBoxPanel ? TooltipConfig.Placement.right : TooltipConfig.Placement.top))); return this; }
Model.<String>of(), Model.of("<pre>" + (jobTO.getStatus() == null ? StringUtils.EMPTY : jobTO.getStatus()) + "</pre>"), new PopoverConfig().withAnimation(true).withHoverTrigger().withHtml(true). withPlacement(TooltipConfig.Placement.left)))); controls.add(new IndicatorAjaxLink<Void>("stop") {
+ "<code>memberships[groupName].attribute</code> or " + "<code>privileges[applicationKey]</code>"), new PopoverConfig().withHtml(true).withPlacement(TooltipConfig.Placement.right)) {
.withHtml(true); WebMarkupContainer legend = new WebMarkupContainer("legend"); legend.add(new PopoverBehavior(new ResourceModel("legend"),