Example usage for org.apache.wicket.markup.html.form CheckBoxMultipleChoice setPrefix

List of usage examples for org.apache.wicket.markup.html.form CheckBoxMultipleChoice setPrefix

Introduction

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

Prototype

public final CheckBoxMultipleChoice<T> setPrefix(final String prefix) 

Source Link

Usage

From source file:org.geoserver.gwc.web.layer.StyleParameterFilterSubform.java

License:Open Source License

public StyleParameterFilterSubform(String id, IModel<StyleParameterFilter> model) {
    super(id, model);

    final Component defaultValue;

    final String allStyles = getLocalizer().getString("allStyles", this);
    final String layerDefault = getLocalizer().getString("layerDefault", this);

    final IModel<List<String>> availableStylesModelDefault = new SetAsListModel(
            new PropertyModel<Set<String>>(model, "layerStyles"), layerDefault);
    final IModel<List<String>> availableStylesModelAllowed = new SetAsListModel(
            new PropertyModel<Set<String>>(model, "layerStyles"), allStyles);
    final IModel<List<String>> selectedStylesModel = new NullableSetAsListModel(
            new PropertyModel<Set<String>>(model, "styles"), allStyles);
    final IModel<String> selectedDefaultModel = new LabelledEmptyStringModel(
            new PropertyModel<String>(model, "realDefault"), layerDefault);

    defaultValue = new DropDownChoice<String>("defaultValue", selectedDefaultModel,
            availableStylesModelDefault);
    add(defaultValue);//from w  w  w. j  a v a 2 s .c  om

    final CheckBoxMultipleChoice<String> styles = new CheckBoxMultipleChoice<String>("styles",
            selectedStylesModel, availableStylesModelAllowed);
    styles.setPrefix("<li>");
    styles.setSuffix("</li>");
    add(styles);
}

From source file:org.onehippo.forge.embargo.frontend.plugins.SetEmbargoDialog.java

License:Apache License

public SetEmbargoDialog(StdWorkflow<EmbargoWorkflow> action, IModel<List<String>> selectedEmbargoGroups,
        List<String> availableEmbargoGroups) {
    super(selectedEmbargoGroups);
    add(new Label("text", new ResourceModel("select-embargo-groups-text")));
    final CheckBoxMultipleChoice<String> embargoGroups = new CheckBoxMultipleChoice<>("checkboxes",
            selectedEmbargoGroups, availableEmbargoGroups);
    embargoGroups.setPrefix("<div>");
    embargoGroups.setSuffix("</div>");
    add(embargoGroups);//  w  ww  . j av  a 2s.c o  m
    this.action = action;
}