Search in sources :

Example 1 with CheckBoxToggleBootstrapFormComponent

use of org.devgateway.toolkit.forms.wicket.components.form.CheckBoxToggleBootstrapFormComponent in project ocvn by devgateway.

the class EditAdminSettingsPage method onInitialize.

@Override
protected void onInitialize() {
    super.onInitialize();
    editForm.add(new Label("excelTitle", new StringResourceModel("excelTitle", this, null)));
    excelBatchSize = new TextFieldBootstrapFormComponent<>("excelBatchSize");
    excelBatchSize.integer();
    excelBatchSize.getField().add(new RangeValidator(1, 10000));
    excelBatchSize.required();
    editForm.add(excelBatchSize);
    editForm.add(new Label("systemTitle", new StringResourceModel("systemTitle", this, null)));
    //        rebootServer = new CheckBoxToggleBootstrapFormComponent("rebootServer");
    //        editForm.add(rebootServer);
    disableApiSecurity = new CheckBoxToggleBootstrapFormComponent("disableApiSecurity");
    editForm.add(disableApiSecurity);
}
Also used : Label(org.apache.wicket.markup.html.basic.Label) RangeValidator(org.apache.wicket.validation.validator.RangeValidator) StringResourceModel(org.apache.wicket.model.StringResourceModel) CheckBoxToggleBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.CheckBoxToggleBootstrapFormComponent)

Example 2 with CheckBoxToggleBootstrapFormComponent

use of org.devgateway.toolkit.forms.wicket.components.form.CheckBoxToggleBootstrapFormComponent in project ocvn by devgateway.

the class EditTestFormPage method onInitialize.

@Override
protected void onInitialize() {
    super.onInitialize();
    TextFieldBootstrapFormComponent<String> textField = new TextFieldBootstrapFormComponent<>("textField");
    textField.required();
    editForm.add(textField);
    TextAreaFieldBootstrapFormComponent<String> textArea = new TextAreaFieldBootstrapFormComponent<>("textArea");
    textArea.required();
    editForm.add(textArea);
    SummernoteBootstrapFormComponent summernote = new SummernoteBootstrapFormComponent("summernote");
    summernote.required();
    editForm.add(summernote);
    Select2ChoiceBootstrapFormComponent<Group> entitySelect = new Select2ChoiceBootstrapFormComponent<Group>("entitySelect", new GenericPersistableJpaRepositoryTextChoiceProvider<Group>(groupRepository));
    entitySelect.required();
    editForm.add(entitySelect);
    Select2MultiChoiceBootstrapFormComponent<Role> entityMultiSelect = new Select2MultiChoiceBootstrapFormComponent<Role>("entityMultiSelect", new GenericPersistableJpaRepositoryTextChoiceProvider<Role>(roleRepository));
    entityMultiSelect.required();
    editForm.add(entityMultiSelect);
    CheckBoxBootstrapFormComponent checkbox = new CheckBoxBootstrapFormComponent("checkbox");
    checkbox.required();
    editForm.add(checkbox);
    CheckBoxPickerBootstrapFormComponent checkboxPicker = new CheckBoxPickerBootstrapFormComponent("checkboxPicker");
    checkboxPicker.required();
    editForm.add(checkboxPicker);
    CheckBoxToggleBootstrapFormComponent checkboxToggle = new CheckBoxToggleBootstrapFormComponent("checkboxToggle");
    checkboxToggle.required();
    editForm.add(checkboxToggle);
    DateFieldBootstrapFormComponent date = new DateFieldBootstrapFormComponent("date");
    date.required();
    editForm.add(date);
    DateTimeFieldBootstrapFormComponent dateTime = new DateTimeFieldBootstrapFormComponent("dateTime");
    dateTime.required();
    editForm.add(dateTime);
    FileInputBootstrapFormComponent fileInput = new FileInputBootstrapFormComponent("fileInput");
    fileInput.required();
    editForm.add(fileInput);
    Select2ChoiceBootstrapFormComponent<Group> preloadedEntitySelect = new Select2ChoiceBootstrapFormComponent<>("preloadedEntitySelect", new GenericChoiceProvider<>(groupRepository.findAll()));
    preloadedEntitySelect.required();
    editForm.add(preloadedEntitySelect);
}
Also used : Group(org.devgateway.toolkit.persistence.dao.categories.Group) Select2MultiChoiceBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.Select2MultiChoiceBootstrapFormComponent) FileInputBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.FileInputBootstrapFormComponent) CheckBoxPickerBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.CheckBoxPickerBootstrapFormComponent) DateTimeFieldBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.DateTimeFieldBootstrapFormComponent) TextAreaFieldBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.TextAreaFieldBootstrapFormComponent) TextFieldBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.TextFieldBootstrapFormComponent) CheckBoxToggleBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.CheckBoxToggleBootstrapFormComponent) SummernoteBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.SummernoteBootstrapFormComponent) DateFieldBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.DateFieldBootstrapFormComponent) Role(org.devgateway.toolkit.persistence.dao.categories.Role) CheckBoxBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.CheckBoxBootstrapFormComponent) Select2ChoiceBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.Select2ChoiceBootstrapFormComponent)

Aggregations

CheckBoxToggleBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.CheckBoxToggleBootstrapFormComponent)2 Label (org.apache.wicket.markup.html.basic.Label)1 StringResourceModel (org.apache.wicket.model.StringResourceModel)1 RangeValidator (org.apache.wicket.validation.validator.RangeValidator)1 CheckBoxBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.CheckBoxBootstrapFormComponent)1 CheckBoxPickerBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.CheckBoxPickerBootstrapFormComponent)1 DateFieldBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.DateFieldBootstrapFormComponent)1 DateTimeFieldBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.DateTimeFieldBootstrapFormComponent)1 FileInputBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.FileInputBootstrapFormComponent)1 Select2ChoiceBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.Select2ChoiceBootstrapFormComponent)1 Select2MultiChoiceBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.Select2MultiChoiceBootstrapFormComponent)1 SummernoteBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.SummernoteBootstrapFormComponent)1 TextAreaFieldBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.TextAreaFieldBootstrapFormComponent)1 TextFieldBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.TextFieldBootstrapFormComponent)1 Group (org.devgateway.toolkit.persistence.dao.categories.Group)1 Role (org.devgateway.toolkit.persistence.dao.categories.Role)1