List of usage examples for org.apache.wicket.markup.html.form SimpleFormComponentLabel add
public MarkupContainer add(final Component... children)
From source file:org.openengsb.ui.admin.wiringPage.CheckedPanel.java
License:Apache License
private void initSimpleLabel() { SimpleFormComponentLabel simpleLabel = new SimpleFormComponentLabel("label", checkBox); simpleLabel.add(new SimpleAttributeModifier("for", checkBox.getMarkupId())); add(simpleLabel);/*from w w w.j ava2 s .c o m*/ }
From source file:org.ujorm.wicket.component.form.fields.Field.java
License:Apache License
/** Create Label and assign the CSS class {@code required} for the mandatory Field */ protected Component createLabel(final Component inp) { final SimpleFormComponentLabel result = new SimpleFormComponentLabel("label", (LabeledWebMarkupContainer) input); //result.setDefaultModel(createLabelModel()); // see the: FormComponent.setLabel() if (isRequired()) { result.add(new CssAppender(CSS_REQUIRED)); }/*from w ww.ja v a 2 s .c o m*/ return result; }