use of org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactFieldsPattern in project drools-wb by kiegroup.
the class ActionInsertFactFieldsPageViewImpl method btnRemoveFactTypesClick.
@UiHandler(value = "btnRemoveFactTypes")
public void btnRemoveFactTypesClick(final ClickEvent event) {
for (ActionInsertFactFieldsPattern p : chosenPatternsSelections) {
chosenPatterns.remove(p);
presenter.removePattern(p);
}
chosenPatternsSelection = null;
setChosenPatterns(chosenPatterns);
setAvailableFields(new ArrayList<AvailableField>());
setChosenFields(new ArrayList<ActionInsertFactCol52>());
presenter.stateChanged();
txtBinding.setText("");
txtBinding.setEnabled(false);
btnRemoveFactTypes.setEnabled(false);
patternDefinition.setVisible(false);
}
use of org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactFieldsPattern in project drools-wb by kiegroup.
the class ActionInsertFactFieldsPageViewImplTest method testPatternsSelectionModel.
@Test
public void testPatternsSelectionModel() throws Exception {
verify(view.chosenPatternsContainer).add(chosenPatternsWidgetCaptor.capture());
patternSelectionModel = (MultiSelectionModel<ActionInsertFactFieldsPattern>) chosenPatternsWidgetCaptor.getValue().getSelectionModel();
pattern = new ActionInsertFactFieldsPattern();
pattern.setFactType("Message");
pattern.setBoundName("m");
patternSelectionModel.setSelected(pattern, true);
assertTrue(patternSelectionModel.isSelected(pattern));
pattern.setInsertedLogically(true);
assertTrue(patternSelectionModel.isSelected(pattern));
}
Aggregations