Example usage for org.apache.wicket.markup.html.form SimpleFormComponentLabel add

List of usage examples for org.apache.wicket.markup.html.form SimpleFormComponentLabel add

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.form SimpleFormComponentLabel add.

Prototype

public MarkupContainer add(final Component... children) 

Source Link

Document

Adds the child component(s) to this container.

Usage

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;
}