/** * Constructor for if you want to set all the properties yourself. * * @param allowHtml * If true, any html of the content will be rendered as is. Otherwise, it will be * escaped. */ public StaticContentStep(final boolean allowHtml) { this.allowHtml = allowHtml; add(new Label("content", "")); }
@Override public Component getHeader(final String componentId) { return new Label(componentId, getDisplayModel()); }
@Override protected Component getViewer(String id, Node node) throws RepositoryException { String value = getValue(node); return new Label(id, value); }
@Override public void populateItem(Item<ICellPopulator<T>> item, String componentId, IModel<T> rowModel) { item.add(new Label(componentId, getDataModel(rowModel))); }
/** * Implementation of populateItem which adds a label to the cell whose model is the provided * property expression evaluated against rowModelObject * * @see ICellPopulator#populateItem(Item, String, IModel) */ @Override public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) { item.add(new Label(componentId, getDataModel(rowModel))); }
/** * factory method for the available items header * * @param componentId * component id of the returned header component * * @return available items component */ protected Component newAvailableHeader(final String componentId) { return new Label(componentId, new ResourceModel("palette.available", "Available")); }
/** * factory method for the selected items header * * @param componentId * component id of the returned header component * * @return header component */ protected Component newSelectedHeader(final String componentId) { return new Label(componentId, new ResourceModel("palette.selected", "Selected")); }
/** Override otherwise the header is not i18n'ized */ @Override public Component newAvailableHeader(final String componentId) { return new Label( componentId, new ResourceModel("JAIEXTPanel.availableHeader")); } };
public ServerBusyPage() { IModel model = new ResourceModel("ServerBusyPage.serverBusyMessage"); add(new Label("serverBusyMessage", model)); } }
@Override public void populateItem(Item<ICellPopulator<TreeNode>> item, String componentId, IModel<TreeNode> rowModel) { item.add(new Label(componentId, Bytes.bytes(rowModel.getObject().getSize()) .toString())); }
/** * @see org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator#populateItem(org.apache.wicket.markup.repeater.Item, * java.lang.String, org.apache.wicket.model.IModel) */ @Override public void populateItem(final Item<ICellPopulator<T>> cellItem, final String componentId, final IModel<T> rowModel) { cellItem.add(new Label(componentId, new PropertyModel<>(rowModel, property))); } }
Component editAttributeLink(final IModel<AttributeDescription> itemModel) { GeoServerAjaxFormLink link = new GeoServerAjaxFormLink("link") { @Override protected void onClick(AjaxRequestTarget target, Form<?> form) { AttributeDescription attribute = itemModel.getObject(); setResponsePage(new AttributeEditPage(attribute, NewFeatureTypePage.this)); } }; link.add(new Label("name", new PropertyModel<String>(itemModel, "name"))); return link; }
/** Constructs the panel with a link containing an image and a label. */ public IconWithLabel( final String id, final PackageResourceReference imageRef, final IModel<String> labelModel) { super(id); add(image = new Image("image", imageRef)); add(label = new Label("label", labelModel)); }
@Override protected void populateItem(ListItem<IModel<String>> item) { item.add( new Label("message", item.getModelObject()) .setEscapeModelStrings(false)); } });
/** Constructs the panel with a link containing an image and a label. */ public ImageExternalLink( final String id, final String href, final PackageResourceReference imageRef, final IModel<String> label) { super(id); add(this.link = new ExternalLink("link", href)); link.add(this.image = new Image("image", imageRef)); link.add(this.label = new Label("label", label)); }
@Override protected void initialize() { IModel<String> title = getTitle(); Label titleLabel = new Label("text", title); titleLabel.add(TitleAttribute.set(getTooltip())); add(titleLabel); } });
protected Component createHint(final IModel<String> hintModel) { final WebMarkupContainer hintContainer = new WebMarkupContainer("hint-visual"); if (hintModel == null) { hintContainer.setVisible(false); } else { hintContainer.add(new Label("hint-text", hintModel)); hintContainer.add(HippoIcon.fromSprite("hint-image", Icon.INFO_CIRCLE)); } return hintContainer; }
public FileUploadBar(final String id, final FileUploadWidgetSettings settings) { super(id); setOutputMarkupId(true); add(new GalleryFileUploadBehavior(settings)); add(new Label("select-files-message", new StringResourceModel("select.files.caption", this, Model.of(settings)))); } }
public UnauthorizedPage() { IModel model = null; if (getSession().getAuthentication() == null || !getSession().getAuthentication().isAuthenticated()) model = new ResourceModel("UnauthorizedPage.loginRequired"); else model = new ResourceModel("UnauthorizedPage.insufficientPrivileges"); add(new Label("unauthorizedMessage", model)); } }