/** * Performs a commit only if the item is valid * * @param item the item to be committed */ public void commitIfValid(String item) { if (validator.isValid(item)) super.commitEdit(propertyFromString(item)); else cancelEdit(); }