Search in sources :

Example 1 with BootstrapCheckBoxPicker

use of de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPicker in project ocvn by devgateway.

the class CheckBoxPickerBootstrapFormComponent method inputField.

@Override
protected BootstrapCheckBoxPicker inputField(final String id, final IModel<Boolean> model) {
    config = new BootstrapCheckBoxPickerConfig().withOnClass("btn-info").withOffClass("btn-warning").withOnIcon(FontAwesomeIconType.thumbs_up).withOffIcon(FontAwesomeIconType.thumbs_down).withReverse(true).withStyle(ButtonGroup.Size.Small);
    final BootstrapCheckBoxPicker checkBoxPicker = new BootstrapCheckBoxPicker("field", initFieldModel(), config);
    checkBoxPicker.add(new AjaxFormComponentUpdatingBehavior("change") {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onUpdate(final AjaxRequestTarget target) {
            CheckBoxPickerBootstrapFormComponent.this.onUpdate(target);
        }
    });
    return checkBoxPicker;
}
Also used : AjaxFormComponentUpdatingBehavior(org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) BootstrapCheckBoxPickerConfig(de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPickerConfig) BootstrapCheckBoxPicker(de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPicker)

Example 2 with BootstrapCheckBoxPicker

use of de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPicker in project oc-explorer by devgateway.

the class CheckBoxPickerBootstrapFormComponent method inputField.

@Override
protected BootstrapCheckBoxPicker inputField(final String id, final IModel<Boolean> model) {
    config = new BootstrapCheckBoxPickerConfig().withOnClass("btn-info").withOffClass("btn-warning").withOnIcon(FontAwesomeIconType.thumbs_up).withOffIcon(FontAwesomeIconType.thumbs_down).withReverse(true).withStyle(ButtonGroup.Size.Small);
    final BootstrapCheckBoxPicker checkBoxPicker = new BootstrapCheckBoxPicker("field", initFieldModel(), config);
    checkBoxPicker.add(new AjaxFormComponentUpdatingBehavior("change") {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onUpdate(final AjaxRequestTarget target) {
            CheckBoxPickerBootstrapFormComponent.this.onUpdate(target);
        }
    });
    return checkBoxPicker;
}
Also used : AjaxFormComponentUpdatingBehavior(org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) BootstrapCheckBoxPickerConfig(de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPickerConfig) BootstrapCheckBoxPicker(de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPicker)

Aggregations

BootstrapCheckBoxPicker (de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPicker)2 BootstrapCheckBoxPickerConfig (de.agilecoders.wicket.extensions.markup.html.bootstrap.form.checkbox.bootstrapcheckbox.BootstrapCheckBoxPickerConfig)2 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)2 AjaxFormComponentUpdatingBehavior (org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior)2