@Override public void initialise() { view.init(this); view.setValidator(getValidator()); patternToActionsMap.clear(); // Set-up validator for the pattern-to-action mapping voodoo getValidator().setPatternToActionInsertFactFieldsMap(patternToActionsMap); // Set-up a factory for value editors view.setDTCellValueWidgetFactory( DTCellValueWidgetFactory.getInstance(model, oracle, false, allowEmptyValues())); // Available types final List<String> availableTypes = Arrays.asList(oracle.getFactTypes()); view.setAvailableFactTypes(availableTypes); // Existing ActionInsertFactCols (should be empty for a new Decision Table) for (ActionCol52 a : model.getActionCols()) { if (a instanceof ActionInsertFactCol52) { final ActionInsertFactCol52 aif = (ActionInsertFactCol52) a; final ActionInsertFactFieldsPattern p = lookupExistingInsertFactPattern(aif.getBoundName()); final List<ActionInsertFactCol52> actions = patternToActionsMap.get(p); getValidator().addActionPattern(p); actions.add(aif); } } view.setChosenPatterns(new ArrayList<ActionInsertFactFieldsPattern>()); view.setAvailableFields(new ArrayList<AvailableField>()); view.setChosenFields(new ArrayList<ActionInsertFactCol52>()); content.setWidget(view); }
@Override public String getBoundName() { return action.getBoundName(); }
@Override public boolean isBound() { return !(action.getBoundName() == null || "".equals(action.getBoundName())); }