use of org.kie.workbench.common.forms.editor.client.editor.events.FormEditorSyncPaletteEvent in project kie-wb-common by kiegroup.
the class FormEditorPresenterTest method testOnSyncPaletteEventHandler.
@Test
public void testOnSyncPaletteEventHandler() {
loadContent();
FormEditorPresenter presenterSpy = spy(presenter);
String formId = presenterSpy.getFormDefinition().getId();
FormEditorSyncPaletteEvent event = new FormEditorSyncPaletteEvent(formId);
presenterSpy.onSyncPalette(event);
verify(presenterSpy).onSyncPalette(formId);
}
use of org.kie.workbench.common.forms.editor.client.editor.events.FormEditorSyncPaletteEvent in project kie-wb-common by kiegroup.
the class EditorFieldLayoutComponent method onPressOk.
protected void onPressOk(FieldDefinition fieldCopy) {
editorHelper.saveFormField(field, fieldCopy);
this.field = fieldCopy;
this.fieldId = Optional.of(fieldCopy.getId());
initComponent();
renderContent();
showProperties = false;
if (configContext != null) {
configContext.getComponentProperties().put(FORM_ID, getFormId());
configContext.getComponentProperties().put(FIELD_ID, field.getId());
configContext.configurationFinished();
configContext = null;
}
syncPaletteEvent.fire(new FormEditorSyncPaletteEvent(getFormId()));
}
Aggregations