public Behavior getDatePickerStyle() { return new CompositeBehavior(AttributeModifier.append("class", "date-pick"), AttributeModifier.replace("size", String.valueOf(format_.length())), AttributeModifier.replace("maxlength", String.valueOf(format_.length())), AttributeModifier.replace("title", format_)); } }
/** * Set the 'class' attribute for the tbody tag. * * @param cssStyle */ public final void setTableBodyCss(final String cssStyle) { body.add(AttributeModifier.replace("class", cssStyle)); }
/** * Results in attribute maxlength in HTML output of input field. For type integer the maxLength will be calculated automatically. * @param maxLength */ public MinMaxNumberField<Z> setMaxLength(final int maxLength) { add(AttributeModifier.replace("maxlength", String.valueOf(maxLength))); return this; }
/** * @param componentId * @return this for chaining. */ public LabelPanel setLabelFor(final String componentId) { label.add(AttributeModifier.replace("for", componentId)); return this; }
@Override protected void onInitialize() { super.onInitialize(); this.add(AttributeModifier.replace("class", CSS_CLASS)); }
@Override public void bind(Component component) { super.bind(component); component.add(AttributeModifier.replace("data-content", body)); }
public TooltipImage(final String id, final ImageDef imageDef, final String tooltip) { super(id, imageDef); WicketUtils.addTooltip(this, tooltip).add(AttributeModifier.replace("border", "0")); }
@Override protected void onBeginPopulateItem(ListItem<T> item) { super.onBeginPopulateItem(item); item.add(AttributeModifier.replace("data-hash", item.getModelObject().hashCode())); } }
@Override protected void onConfigure() { super.onConfigure(); this.add(AttributeModifier.replace("data-title", this.getDefaultModel())); }
private Component repositoryLink(String id, LogEvent item) { String repositoryURL = item.getRepositoryURL(); String name = new File(repositoryURL).getName(); Label label = new Label(id, name); label.add(AttributeModifier.replace("title", repositoryURL)); return label; }
@Override protected void onConfigure() { super.onConfigure(); this.add(AttributeModifier.replace("data-title", this.getDefaultModel())); }
public LabelForPanel(final String id, final Component field, final String text) { super(id); field.setOutputMarkupId(true); final Label label = new Label("label", text); label.add(AttributeModifier.replace("for", field.getMarkupId())); add(label); } }
MasterDetailNoRecordsToolbar(DataTable<?, ?> table) { super(table); final WebMarkupContainer td = new WebMarkupContainer("td"); add(td); td.add(AttributeModifier.replace("colspan", new AbstractReadOnlyModel<String>() { @Override public String getObject() { return String.valueOf(table.getColumns().size()).intern(); } })); td.add(new Label("msg", $m.ofValue("Nenhum item foi adicionado."))); }
MasterDetailNoRecordsToolbar(DataTable<?, ?> table) { super(table); final WebMarkupContainer td = new WebMarkupContainer("td"); add(td); td.add(AttributeModifier.replace("colspan", new AbstractReadOnlyModel<String>() { @Override public String getObject() { return String.valueOf(table.getColumns().size()).intern(); } })); td.add(new Label("msg", $m.ofValue("Nenhum item foi adicionado."))); }
@Override protected void populateItem(LoopItem item) { item.add(AttributeModifier.replace("class", "level" + (level + 1))); item.add(new S2ContainerFragment("container", container.getChild(item.getIndex()), level + 1)); } }.setVisible(container.getChildSize() > 0));
@Override public void bind(Component component) { super.bind(component); component.add(AttributeModifier.replace("data-tooltip", true)); this.selector = JQueryWidget.getSelector(component); this.setOption("items", Options.asString("[data-tooltip]")); this.setOption("content", String.format("function() { return %s; }", this.render(this.newContent(CONTENT_ID)))); }
public TopPlugin(final IPluginContext context, final IPluginConfig config) { super(context, config); final WebMarkupContainer logo = new WebMarkupContainer("logo"); logo.add(TitleAttribute.set("Hippo Release Version: " + SYSTEM_INFO.getReleaseVersion())); add(logo); final WebComponent toolbar = new WebComponent(BAR_STYLES); final String style = obtainBreadcrumbStyle(config); if (StringUtils.isNotBlank(style)) { toolbar.add(AttributeModifier.replace("style", style)); } add(toolbar); }
@Override protected Component newMessageDisplayComponent(String id, FeedbackMessage message) { WebMarkupContainer container = new WebMarkupContainer(id); container.add(new EmptyPanel("icon").add(AttributeModifier.replace("class", this.getIconClass(message)))); container.add(super.newMessageDisplayComponent("label", message)); return container; }
public LinkFragment(String id, UrlMenuItem item) { super(id, "link-fragment", Menu.this); WebMarkupContainer link = new WebMarkupContainer("link"); link.add(AttributeModifier.replace("href", item.getUrl())); link.add(new EmptyPanel("icon").add(AttributeModifier.append("class", KendoIcon.getCssClass(item.getIcon())))); link.add(new Label("title", item.getTitle()).setRenderBodyOnly(true)); this.add(link); } }