Search in sources :

Example 1 with RefreshMetaDataPanelEvent

use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshMetaDataPanelEvent in project drools-wb by kiegroup.

the class GuidedDecisionTablePresenter method refreshColumnsPage.

void refreshColumnsPage() {
    refreshAttributesPanelEvent.fire(new RefreshAttributesPanelEvent(this, model.getAttributeCols()));
    refreshMetaDataPanelEvent.fire(new RefreshMetaDataPanelEvent(this, model.getMetadataCols()));
    refreshConditionsPanelEvent.fire(new RefreshConditionsPanelEvent(this, model.getConditions()));
    refreshActionsPanelEvent.fire(new RefreshActionsPanelEvent(this, model.getActionCols()));
}
Also used : RefreshAttributesPanelEvent(org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshAttributesPanelEvent) RefreshMetaDataPanelEvent(org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshMetaDataPanelEvent) RefreshConditionsPanelEvent(org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshConditionsPanelEvent) RefreshActionsPanelEvent(org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshActionsPanelEvent)

Example 2 with RefreshMetaDataPanelEvent

use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshMetaDataPanelEvent in project drools-wb by kiegroup.

the class ColumnsPagePresenterTest method testOnRefreshMetaDataPanelEvent.

@Test
public void testOnRefreshMetaDataPanelEvent() {
    final RefreshMetaDataPanelEvent event = mock(RefreshMetaDataPanelEvent.class);
    final GuidedDecisionTableView.Presenter eventPresenter = mock(GuidedDecisionTableView.Presenter.class);
    final List<MetadataCol52> columns = new ArrayList<>();
    doReturn(eventPresenter).when(event).getPresenter();
    doReturn(columns).when(event).getColumns();
    doNothing().when(presenter).refreshMetaDataWidget(any());
    doNothing().when(presenter).refreshColumnsNoteInfo(any());
    presenter.onRefreshMetaDataPanelEvent(event);
    verify(presenter).refreshMetaDataWidget(columns);
    verify(presenter).refreshColumnsNoteInfo(eventPresenter);
}
Also used : MetadataCol52(org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52) RefreshMetaDataPanelEvent(org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshMetaDataPanelEvent) ArrayList(java.util.ArrayList) GuidedDecisionTableView(org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView) Test(org.junit.Test)

Example 3 with RefreshMetaDataPanelEvent

use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshMetaDataPanelEvent in project drools-wb by kiegroup.

the class GuidedDecisionTablePresenterAttributesAndMetadataTest method appendMetadataColumn.

@Test
public void appendMetadataColumn() throws VetoException {
    reset(modellerPresenter);
    final MetadataCol52 column = new MetadataCol52();
    column.setMetadata("metadata");
    dtPresenter.appendColumn(column);
    verify(synchronizer, times(1)).appendColumn(eq(column));
    verify(refreshMetaDataPanelEvent, times(1)).fire(any(RefreshMetaDataPanelEvent.class));
    verify(modellerPresenter, times(1)).updateLinks();
}
Also used : MetadataCol52(org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52) RefreshMetaDataPanelEvent(org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshMetaDataPanelEvent) Test(org.junit.Test)

Aggregations

RefreshMetaDataPanelEvent (org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshMetaDataPanelEvent)3 MetadataCol52 (org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52)2 Test (org.junit.Test)2 ArrayList (java.util.ArrayList)1 GuidedDecisionTableView (org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView)1 RefreshActionsPanelEvent (org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshActionsPanelEvent)1 RefreshAttributesPanelEvent (org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshAttributesPanelEvent)1 RefreshConditionsPanelEvent (org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshConditionsPanelEvent)1