@Test public void testHelperOnCloseWithContext() { ModalConfigurationContext ctx = mock(ModalConfigurationContext.class); when(ctx.getComponentProperties()).thenReturn(mock(Map.class)); testDroppingNewField(); editorFieldLayoutComponent.getConfigurationModal(ctx); propertiesRendererHelper.onClose(); assertFalse(editorFieldLayoutComponent.showProperties); verify(ctx).configurationCancelled(); }
@Override public Modal getConfigurationModal(final ModalConfigurationContext ctx) { showProperties = true; configContext = ctx; if (field == null) { initContent(ctx.getComponentProperties()); } else { propertiesRenderer.render(propertiesRendererHelper); } return propertiesRenderer.getView().getPropertiesModal(); }
EditorFieldLayoutComponent extends FieldLayoutComponent implements HasDragAndDropSettings,
                                                                                HasModalConfiguration { @Override public Modal getConfigurationModal(final ModalConfigurationContext ctx) { showProperties = true; configContext = ctx; if (field == null) { initContent(ctx.getComponentProperties()); } else { propertiesRenderer.render(propertiesRendererHelper); } return propertiesRenderer.getView().getPropertiesModal(); } }
EditorFieldLayoutComponent extends FieldLayoutComponent implements HasDragAndDropSettings,
                                                                                HasModalConfiguration { @Override public Modal getConfigurationModal(final ModalConfigurationContext ctx) { showProperties = true; configContext = ctx; if (field == null) { initContent(ctx.getComponentProperties()); } else { propertiesRenderer.render(propertiesRendererHelper); } return propertiesRenderer.getView().getPropertiesModal(); } @Inject  EditorFieldLayoutComponent(FieldRendererManager fieldRendererManager,
                                      TranslationService translationService,
                                      FieldPropertiesRenderer propertiesRenderer,
                                      FieldManager fieldManager,
                                      Event<FormEditorSyncPaletteEvent> syncPaletteEvent); }
EditorFieldLayoutComponent extends FieldLayoutComponent implements HasDragAndDropSettings,
                                                                                HasModalConfiguration { @Override public Modal getConfigurationModal(final ModalConfigurationContext ctx) { showProperties = true; configContext = ctx; if (field == null) { initContent(ctx.getComponentProperties()); } else { propertiesRenderer.render(propertiesRendererHelper); } return propertiesRenderer.getView().getPropertiesModal(); } @Inject  EditorFieldLayoutComponent(FieldRendererManager fieldRendererManager,
                                      TranslationService translationService,
                                      FieldPropertiesRenderer propertiesRenderer,
                                      FieldManager fieldManager,
                                      Event<FormEditorSyncPaletteEvent> syncPaletteEvent); @Override void init(FormRenderingContext renderingContext,
                     FieldDefinition field); @Override String[] getSettingsKeys(); @Override void setSettingValue(String key,
                                String value); @Override String getSettingValue(String key); @Override Map<String, String> getMapSettings(); @Override Modal getConfigurationModal(final ModalConfigurationContext ctx); }
EditorFieldLayoutComponent extends FieldLayoutComponent implements HasDragAndDropSettings,
                                                                                HasModalConfiguration { @Override public Modal getConfigurationModal(final ModalConfigurationContext ctx) { showProperties = true; configContext = ctx; if (field == null) { initContent(ctx.getComponentProperties()); } else { propertiesRenderer.render(propertiesRendererHelper); } return propertiesRenderer.getView().getPropertiesModal(); } @Inject  EditorFieldLayoutComponent(FieldRendererManager fieldRendererManager,
                                      TranslationService translationService,
                                      FieldPropertiesRenderer propertiesRenderer,
                                      FieldManager fieldManager,
                                      Event<FormEditorSyncPaletteEvent> syncPaletteEvent); @Override void init(FormRenderingContext renderingContext,
                     FieldDefinition field); @Override String[] getSettingsKeys(); @Override void setSettingValue(String key,
                                String value); @Override String getSettingValue(String key); @Override Map<String, String> getMapSettings(); @Override Modal getConfigurationModal(final ModalConfigurationContext ctx); final String[] SETTINGS_KEYS; }