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()));
}
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();
}
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);
}
Aggregations