use of org.kie.workbench.common.forms.editor.client.editor.groupProviders.FormEditorFieldGroupsProvider in project kie-wb-common by kiegroup.
the class FormEditorPresenter method loadAvailableFields.
protected void loadAvailableFields() {
String groupName = translationService.getTranslation(FormEditorConstants.FormEditorPresenterModelFields);
List<LayoutDragComponent> fieldComponents = editorHelper.getAvailableFields().values().stream().map(fieldDefinition -> {
EditorFieldLayoutComponent layoutFieldComponent = editorFieldLayoutComponents.get();
if (layoutFieldComponent != null) {
layoutFieldComponent.init(editorHelper.getRenderingContext(), fieldDefinition);
return layoutFieldComponent;
}
return null;
}).filter(Objects::nonNull).collect(Collectors.toList());
layoutDragComponentPalette.addDraggableGroup(new FormEditorFieldGroupsProvider(groupName, fieldComponents));
}
use of org.kie.workbench.common.forms.editor.client.editor.groupProviders.FormEditorFieldGroupsProvider in project kie-wb-common by kiegroup.
the class FormEditorPresenter method loadFormControls.
protected void loadFormControls() {
String groupName = translationService.getTranslation(FormEditorConstants.FormEditorPresenterComponentsPalette);
List<LayoutDragComponent> components = new ArrayList<>();
components.add(htmlLayoutDragComponent);
editorHelper.getBaseFieldsDraggables().forEach(components::add);
layoutDragComponentPalette.addDraggableGroup(new FormEditorFieldGroupsProvider(groupName, components));
}
Aggregations