Search in sources :

Example 1 with RefreshActionsPanelEvent

use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshActionsPanelEvent 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 RefreshActionsPanelEvent

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

the class GuidedDecisionTablePresenterTest method appendActionColumn.

@Test
public void appendActionColumn() throws VetoException {
    reset(modellerPresenter);
    final ActionInsertFactCol52 action = new ActionInsertFactCol52();
    action.setFactType("FactType");
    action.setFactField("field");
    action.setHeader("header");
    when(oracle.getFieldType(eq("FactType"), eq("field"))).thenReturn(DataType.TYPE_STRING);
    dtPresenter.appendColumn(action);
    verify(synchronizer, times(1)).appendColumn(eq(action));
    verify(refreshActionsPanelEvent, times(1)).fire(any(RefreshActionsPanelEvent.class));
    verify(modellerPresenter, times(1)).updateLinks();
}
Also used : ActionInsertFactCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52) RefreshActionsPanelEvent(org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshActionsPanelEvent) Test(org.junit.Test)

Example 3 with RefreshActionsPanelEvent

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

the class ColumnsPagePresenterTest method testOnRefreshActionsPanelEvent.

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

Aggregations

RefreshActionsPanelEvent (org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshActionsPanelEvent)3 Test (org.junit.Test)2 ArrayList (java.util.ArrayList)1 ActionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionCol52)1 ActionInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52)1 GuidedDecisionTableView (org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView)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 RefreshMetaDataPanelEvent (org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshMetaDataPanelEvent)1