Search in sources :

Example 1 with LayoutDragComponentGroup

use of org.uberfire.ext.layout.editor.client.api.LayoutDragComponentGroup in project kie-wb-common by kiegroup.

the class FormEditorPresenter method loadAvailableFields.

protected void loadAvailableFields() {
    LayoutDragComponentGroup group = new LayoutDragComponentGroup(translationService.getTranslation(FormEditorConstants.FormEditorPresenterModelFields));
    editorHelper.getAvailableFields().values().forEach(fieldDefinition -> {
        EditorFieldLayoutComponent layoutFieldComponent = editorFieldLayoutComponents.get();
        if (layoutFieldComponent != null) {
            layoutFieldComponent.init(editorHelper.getRenderingContext(), fieldDefinition);
            group.addLayoutDragComponent(fieldDefinition.getId(), layoutFieldComponent);
        }
    });
    layoutDragComponentPalette.addDraggableGroup(group);
}
Also used : LayoutDragComponentGroup(org.uberfire.ext.layout.editor.client.api.LayoutDragComponentGroup) EditorFieldLayoutComponent(org.kie.workbench.common.forms.editor.client.editor.rendering.EditorFieldLayoutComponent)

Example 2 with LayoutDragComponentGroup

use of org.uberfire.ext.layout.editor.client.api.LayoutDragComponentGroup in project kie-wb-common by kiegroup.

the class FormEditorPresenter method loadFormControls.

protected void loadFormControls() {
    LayoutDragComponentGroup group = new LayoutDragComponentGroup(translationService.getTranslation(FormEditorConstants.FormEditorPresenterComponentsPalette));
    group.addLayoutDragComponent("html", htmlLayoutDragComponent);
    editorHelper.getBaseFieldsDraggables().forEach(component -> group.addLayoutDragComponent(component.getFieldId(), component));
    layoutDragComponentPalette.addDraggableGroup(group);
}
Also used : LayoutDragComponentGroup(org.uberfire.ext.layout.editor.client.api.LayoutDragComponentGroup)

Aggregations

LayoutDragComponentGroup (org.uberfire.ext.layout.editor.client.api.LayoutDragComponentGroup)2 EditorFieldLayoutComponent (org.kie.workbench.common.forms.editor.client.editor.rendering.EditorFieldLayoutComponent)1