Refine search
@Override public void populateItem( final Item<ICellPopulator<Misaligned>> cellItem, final String componentId, final IModel<Misaligned> rowModel) { cellItem.add(new Label(componentId, rowModel.getObject().getOnResource().toString())); cellItem.add(new AttributeModifier("class", "code-addition")); } });
@Override protected void populateItem(Item<String> item) { Label label = new Label("stat", item.getModel()); label.setEscapeModelStrings(false); item.add(label); } });
public Component createComponent(String id, DebugBar debugBar) { Label label = new Label(id, new AbstractReadOnlyModel<String>() { private static final long serialVersionUID = 1L; @Override public String getObject() { return Application.get().getFrameworkSettings().getVersion(); } }); label.add(new SimpleAttributeModifier("class", "wicketversioncontrib")); return label; }
public ControlGroup(final String id, final IModel<String> label, final IModel<String> help) { super(id, Model.of("")); this.label = new Label("label", label); this.help = new Label("help", help); this.extra = new Label("extra-label", ""); extra.setVisible(false); this.feedbackLabel = new Label("feedback", Model.of("")); addToBorder(this.label, this.help, this.feedbackLabel, this.extra); }
public AbstractWorkflowDialog(IModel<T> model, IModel message, IWorkflowInvoker invoker) { super(model); this.invoker = invoker; Label notification = new Label("notification"); if (message != null) { notification.setDefaultModel(message); } else { notification.setVisible(false); } add(notification); notification.add(CssClass.append("notification")); }
@Override public void populateItem(final Item<ICellPopulator<ToDoDO>> item, final String componentId, final IModel<ToDoDO> rowModel) { final ToDoDO todo = rowModel.getObject(); final String formattedPriority = priorityFormatter.getFormattedPriority(todo.getPriority()); final Label label = new Label(componentId, new Model<String>(formattedPriority)); label.setEscapeModelStrings(false); item.add(label); cellItemListener.populateItem(item, componentId, rowModel); } });
@Override protected void onInitialize() { super.onInitialize(); WebMarkupContainer ownerLink = new WebMarkupContainer("ownerLink"); ownerLink.add(new AttributeModifier("href", new ResourceModel("footer.product.owner.addr"))); ownerLink.add(new AttributeModifier("title", new ResourceModel("footer.product.owner.title"))); add(new Label("version", Model.of(getVersion()))); add(ownerLink); }
Component typeLink(String id, IModel<LayerGroupEntry> itemModel) { LayerGroupEntry entry = itemModel.getObject(); return new Label(id, "<i>" + entry.getType().toString() + "</i>") .setEscapeModelStrings(false); }
private Label newHeadLabel() { final AtrBasic attr = lista.getObject().asAtr(); final IModel<String> labelModel = $m.ofValue(trimToEmpty(attr.getLabel())); ctx.configureContainer(labelModel); Label label = new Label("headLabel", labelModel); if (ctx.getViewMode() != null && ctx.getViewMode().isEdition()) { label.add(new RequiredListLabelClassAppender(ctx.getModel())); } return label; }
@Override protected Label buildLabel(String id, AttributeModel<String> labelModel) { String s = labelModel.getObject(); s = s.replace("\n", "<br />"); Label label = new Label(id, Model.of(s)); label.setEscapeModelStrings(false); return label; }
/** * creates a new image element * * @param markupId the markup id of the header * @param image the current image for this header * @return new image component */ protected Component newImage(final String markupId, final ICarouselImage image) { final Label img = new Label(markupId); img.add(new AttributeModifier("src", image.url())); return img; }
public NotificationMailBody(final String id, final String body) { super(id); add(new Label("body", Model.of(body)).setOutputMarkupId(true)); } }
protected WebComponent newNavigatorLabel(final String navigatorId, final DataTable<?, ?> table) { if (showNavigationLabel) { return new NavigatorLabel(navigatorId, table); } Label label = new Label(navigatorId); label.setVisible(false); return label; }
/** * Construct. * * @param id the component id * @param model the default image url */ public ThumbnailBorder(String id, IModel<String> model) { super(id, model); add(title = new Label("title", Model.of("")), image = new Label("image").add(new AttributeModifier("url", getDefaultModel()))); }
protected Component createNrItemsLabel() { if ((IEditor.Mode.EDIT == mode) && (getMaxItems() > 0)) { final IModel propertyModel = new StringResourceModel("nrItemsLabel", this, new Model<AbstractFieldPlugin>(this)); return new Label("nrItemsLabel", propertyModel).setOutputMarkupId(true); } return new Label("nrItemsLabel").setVisible(false); }
public RadioButtonLabelPanel(final String id, final IModel<T> model, final String label) { super(id); radioButton = new Radio<T>("radioButton", model); add(radioButton); final Model<String> labelModel = new Model<String>(label); radioButton.setLabel(labelModel); // I18n key must be implemented as Model not as String because in constructor (before adding this component to parent) a warning will be // logged for using getString(String). add(new Label("label", labelModel).add(AttributeModifier.replace("for", radioButton.getMarkupId()))); setRenderBodyOnly(true); }
public FoundationTopBarMenuContainer(String id, IModel<TopBarMenuLayout> menuLayoutModel, IModel<String> menuTitleModel) { super(id); this.menuLayoutModel = menuLayoutModel; Label menuTitle = new Label("menuTitle", menuTitleModel); add(menuTitle); TopBarMenuLayout layout = menuLayoutModel.getObject(); if (!layout.equals(TopBarMenuLayout.TITLE) && !layout.equals(TopBarMenuLayout.TITLE_AND_ICON)) { menuTitle.setVisible(false); } }