Search in sources :

Example 1 with GenericChoiceProvider

use of org.devgateway.toolkit.forms.wicket.providers.GenericChoiceProvider in project oc-explorer by devgateway.

the class EditColorIndicatorPairPage method onInitialize.

@Override
protected void onInitialize() {
    super.onInitialize();
    firstIndicator = new Select2ChoiceBootstrapFormComponent<String>("firstIndicator", new GenericChoiceProvider<String>(FlagsConstants.FLAGS_LIST));
    firstIndicator.required();
    editForm.add(firstIndicator);
    secondIndicator = new Select2ChoiceBootstrapFormComponent<String>("secondIndicator", new GenericChoiceProvider<String>(FlagsConstants.FLAGS_LIST));
    secondIndicator.required();
    editForm.add(secondIndicator);
    ColorPickerBootstrapFormComponent color = new ColorPickerBootstrapFormComponent("color");
    color.required();
    editForm.add(color);
    editForm.add(new ColorIndicatorDistinctFormValidator());
    editForm.add(new ColorIndicatorUniquePairFormValidator(compoundModel));
}
Also used : GenericChoiceProvider(org.devgateway.toolkit.forms.wicket.providers.GenericChoiceProvider) ColorPickerBootstrapFormComponent(org.devgateway.toolkit.forms.wicket.components.form.ColorPickerBootstrapFormComponent)

Aggregations

ColorPickerBootstrapFormComponent (org.devgateway.toolkit.forms.wicket.components.form.ColorPickerBootstrapFormComponent)1 GenericChoiceProvider (org.devgateway.toolkit.forms.wicket.providers.GenericChoiceProvider)1