use of org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup in project kie-wb-common by kiegroup.
the class ColorPickerFieldRenderer method getFormGroup.
@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
colorPicker.setReadOnly(!renderingContext.getRenderMode().equals(RenderMode.EDIT_MODE));
DefaultFormGroup formGroup = formGroupsInstance.get();
formGroup.render(colorPicker, field);
return formGroup;
}
use of org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup in project kie-wb-common by kiegroup.
the class AbstractListBoxFieldRenderer method getFormGroup.
@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
DefaultFormGroup formGroup = formGroupsInstance.get();
if (renderMode.equals(RenderMode.PRETTY_MODE)) {
formGroup.render(new HTML(), field);
} else {
String inputId = generateUniqueId();
widgetList.setId(inputId);
widgetList.setEnabled(!field.getReadOnly());
refreshSelectorOptions();
formGroup.render(inputId, widgetList, field);
}
return formGroup;
}
use of org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup in project kie-wb-common by kiegroup.
the class DecimalBoxFieldRenderer method getFormGroup.
@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
DefaultFormGroup formGroup = formGroupsInstance.get();
if (renderMode.equals(RenderMode.PRETTY_MODE)) {
formGroup.render(new HTML(), field);
} else {
String inputId = generateUniqueId();
decimalBox.setId(inputId);
decimalBox.setPlaceholder(field.getPlaceHolder());
decimalBox.setMaxLength(field.getMaxLength());
decimalBox.setEnabled(!field.getReadOnly());
formGroup.render(inputId, decimalBox.asWidget(), field);
}
return formGroup;
}
use of org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup in project kie-wb-common by kiegroup.
the class IntegerBoxFieldRenderer method getFormGroup.
@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
Widget widget;
String inputId = generateUniqueId();
if (renderMode.equals(RenderMode.PRETTY_MODE)) {
widget = new HTML();
widget.getElement().setId(inputId);
} else {
integerBox.setId(inputId);
integerBox.setPlaceholder(field.getPlaceHolder());
integerBox.setMaxLength(field.getMaxLength());
integerBox.setEnabled(!field.getReadOnly());
widget = integerBox.asWidget();
}
DefaultFormGroup formGroup = formGroupsInstance.get();
formGroup.render(inputId, widget, field);
return formGroup;
}
use of org.kie.workbench.common.forms.dynamic.client.rendering.formGroups.impl.def.DefaultFormGroup in project kie-wb-common by kiegroup.
the class MultipleSelectorFieldRenderer method getFormGroup.
@Override
protected FormGroup getFormGroup(RenderMode renderMode) {
DefaultFormGroup formGroup = formGroupsInstance.get();
final List<TYPE> values = field.getListOfValues();
selector.init(searchService, new MultipleLiveSearchSelectionHandler<>(field.getMaxElementsOnTitle()));
selector.setMaxItems(field.getMaxDropdownElements());
selector.setEnabled(!field.getReadOnly() && renderingContext.getRenderMode().equals(RenderMode.EDIT_MODE));
selector.setFilterEnabled(field.getAllowFilter());
selector.setClearSelectionEnabled(field.getAllowClearSelection());
if (renderMode.equals(RenderMode.PRETTY_MODE)) {
selector.setEnabled(false);
}
formGroup.render(selector.asWidget(), field);
return formGroup;
}
Aggregations