refresh list after correcting a value

This commit is contained in:
Andreas Billmann
2015-12-18 01:47:38 +01:00
parent 941f1b9037
commit 9b8b0080ff
3 changed files with 4 additions and 4 deletions

View File

@@ -264,8 +264,8 @@ public class SmartCSVController extends FXMLController {
@Override @Override
public void handle(TableColumn.CellEditEvent<CSVRow, CSVValue> event) { public void handle(TableColumn.CellEditEvent<CSVRow, CSVValue> event) {
event.getTableView().getItems().get(event.getTablePosition().getRow()). event.getTableView().getItems().get(event.getTablePosition().getRow()).
getColumns().get(header). getColumns().get(header).setValue(event.getNewValue());
setValue(event.getNewValue()); runLater(() -> model.revalidate());
} }
}); });

View File

@@ -35,7 +35,7 @@ import java.util.ResourceBundle;
import static ninja.javafx.smartcsv.fx.util.I18nValidationUtil.getI18nValidatioMessage; import static ninja.javafx.smartcsv.fx.util.I18nValidationUtil.getI18nValidatioMessage;
/** /**
* TODO: DESCRIPTION!!! * Cell to show the error text
*/ */
public class ValidationErrorListCell extends ListCell<ValidationError> { public class ValidationErrorListCell extends ListCell<ValidationError> {

View File

@@ -109,7 +109,7 @@ public class CSVModel {
/** /**
* walks through the data and validates each value * walks through the data and validates each value
*/ */
private void revalidate() { public void revalidate() {
validationError.clear(); validationError.clear();
if (header != null && validator != null) { if (header != null && validator != null) {