use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshAttributesPanelEvent 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.RefreshAttributesPanelEvent in project drools-wb by kiegroup.
the class ColumnsPagePresenterTest method testOnRefreshAttributesPanelEvent.
@Test
public void testOnRefreshAttributesPanelEvent() {
final RefreshAttributesPanelEvent event = mock(RefreshAttributesPanelEvent.class);
final GuidedDecisionTableView.Presenter eventPresenter = mock(GuidedDecisionTableView.Presenter.class);
final List<AttributeCol52> columns = new ArrayList<>();
doReturn(eventPresenter).when(event).getPresenter();
doReturn(columns).when(event).getColumns();
doNothing().when(presenter).refreshAttributeWidget(any());
doNothing().when(presenter).refreshColumnsNoteInfo(any());
presenter.onRefreshAttributesPanelEvent(event);
verify(presenter).refreshAttributeWidget(columns);
verify(presenter).refreshColumnsNoteInfo(eventPresenter);
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshAttributesPanelEvent in project drools-wb by kiegroup.
the class GuidedDecisionTablePresenterAttributesAndMetadataTest method appendAttributeColumn.
@Test
public void appendAttributeColumn() throws VetoException {
reset(modellerPresenter);
final AttributeCol52 column = new AttributeCol52();
column.setAttribute(RuleAttributeWidget.AUTO_FOCUS_ATTR);
dtPresenter.appendColumn(column);
verify(synchronizer, times(1)).appendColumn(eq(column));
verify(refreshAttributesPanelEvent, times(1)).fire(any(RefreshAttributesPanelEvent.class));
verify(modellerPresenter, times(1)).updateLinks();
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.events.cdi.RefreshAttributesPanelEvent in project drools-wb by kiegroup.
the class GuidedDecisionTablePresenterTest method deleteAttributeColumn.
@Test
public void deleteAttributeColumn() throws Exception {
final AttributeCol52 column = new AttributeCol52();
column.setAttribute("salience");
dtPresenter.appendColumn(column);
reset(modellerPresenter);
dtPresenter.deleteColumn(column);
verify(synchronizer, times(1)).deleteColumn(eq(column));
verify(modellerPresenter, times(1)).updateLinks();
verify(refreshAttributesPanelEvent, times(2)).fire(any(RefreshAttributesPanelEvent.class));
checkDTSelectionsChangedEventFired(1);
}
Aggregations