Search in sources :

Example 1 with FileInputBootstrapFormComponent

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

the class EditVietnamImportSourceFiles method onInitialize.

@Override
protected void onInitialize() {
    super.onInitialize();
    TextFieldBootstrapFormComponent<String> name = new TextFieldBootstrapFormComponent<>("name");
    name.required();
    editForm.add(name);
    TextAreaFieldBootstrapFormComponent<String> description = new TextAreaFieldBootstrapFormComponent<>("description");
    editForm.add(description);
    FileInputBootstrapFormComponent prototypeDatabaseFile = new FileInputBootstrapFormComponent("prototypeDatabaseFile");
    prototypeDatabaseFile.maxFiles(1);
    prototypeDatabaseFile.required();
    editForm.add(prototypeDatabaseFile);
    FileInputBootstrapFormComponent publicInstitutionsSuppliersFile = new FileInputBootstrapFormComponent("publicInstitutionsSuppliersFile");
    publicInstitutionsSuppliersFile.maxFiles(1);
    publicInstitutionsSuppliersFile.required();
    editForm.add(publicInstitutionsSuppliersFile);
    FileInputBootstrapFormComponent cityDepartmentGroupFile = new FileInputBootstrapFormComponent("cityDepartmentGroupFile");
    cityDepartmentGroupFile.maxFiles(1);
    cityDepartmentGroupFile.required();
    editForm.add(cityDepartmentGroupFile);
    ResourceLink locationsTemplate = new ResourceLink("locationsTemplate", new PackageResourceReference(RootXlsx.class, "Location_Table_SO.xlsx"));
    editForm.add(locationsTemplate);
    ResourceLink suppliersTemplate = new ResourceLink("suppliersTemplate", new PackageResourceReference(RootXlsx.class, "UM_PUBINSTITU_SUPPLIERS_DQA.xlsx"));
    editForm.add(suppliersTemplate);
    ResourceLink prototypeDatabase = new ResourceLink("prototypeDatabase", new PackageResourceReference(RootXlsx.class, "Prototype_Database_OCDSCore.xlsx"));
    editForm.add(prototypeDatabase);
    ResourceLink cityDepartmentGroupFileTemplate = new ResourceLink("cityDepartmentGroupFileTemplate", new PackageResourceReference(RootXlsx.class, "test_city_department_group.xlsx"));
    editForm.add(cityDepartmentGroupFileTemplate);
    FileInputBootstrapFormComponent locationsFile = new FileInputBootstrapFormComponent("locationsFile");
    locationsFile.maxFiles(1);
    locationsFile.required();
    editForm.add(locationsFile);
}
Also used : RootXlsx(org.devgateway.ocvn.forms.xlsx.RootXlsx) FileInputBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.FileInputBootstrapFormComponent) ResourceLink(org.apache.wicket.markup.html.link.ResourceLink) PackageResourceReference(org.apache.wicket.request.resource.PackageResourceReference) TextAreaFieldBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.TextAreaFieldBootstrapFormComponent) TextFieldBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.TextFieldBootstrapFormComponent)

Example 2 with FileInputBootstrapFormComponent

use of org.devgateway.toolkit.forms.wicket.components.form.FileInputBootstrapFormComponent 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)

Example 3 with FileInputBootstrapFormComponent

use of org.devgateway.toolkit.forms.wicket.components.form.FileInputBootstrapFormComponent in project oc-explorer 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);
    ColorPickerBootstrapFormComponent colorPicker = new ColorPickerBootstrapFormComponent("colorPicker");
    colorPicker.required();
    editForm.add(colorPicker);
}
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) ColorPickerBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.ColorPickerBootstrapFormComponent) 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

FileInputBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.FileInputBootstrapFormComponent)3 TextAreaFieldBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.TextAreaFieldBootstrapFormComponent)3 TextFieldBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.TextFieldBootstrapFormComponent)3 CheckBoxBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.CheckBoxBootstrapFormComponent)2 CheckBoxPickerBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.CheckBoxPickerBootstrapFormComponent)2 CheckBoxToggleBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.CheckBoxToggleBootstrapFormComponent)2 DateFieldBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.DateFieldBootstrapFormComponent)2 DateTimeFieldBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.DateTimeFieldBootstrapFormComponent)2 Select2ChoiceBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.Select2ChoiceBootstrapFormComponent)2 Select2MultiChoiceBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.Select2MultiChoiceBootstrapFormComponent)2 SummernoteBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.SummernoteBootstrapFormComponent)2 Group (org.devgateway.toolkit.persistence.dao.categories.Group)2 Role (org.devgateway.toolkit.persistence.dao.categories.Role)2 ResourceLink (org.apache.wicket.markup.html.link.ResourceLink)1 PackageResourceReference (org.apache.wicket.request.resource.PackageResourceReference)1 RootXlsx (org.devgateway.ocvn.forms.xlsx.RootXlsx)1 ColorPickerBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.ColorPickerBootstrapFormComponent)1