// Implements AItemModel protected void checkChangeInGUI() { boolean isValid = validateString(editView.getName(), 1); if (editView.getName().trim().equals(name) && (editView.getDescription().trim().equals(description))) { editView.setEditing(false, isValid); } else { editView.setEditing(true, isValid); } // validation editView.setNameIsValueValid(isValid); } // END protected void checkChangeInGUI()
// Implements AModel. protected void updateModel() { // get values from editView and trim them String nameV = editView.getName().trim(); // validate where necessary List<String> errors = validateIt(id, nameV); // if validation is ok, save the new values. if (0 == errors.size()) { // validated values name = nameV; // not validated values description = editView.getDescription().trim(); // save needed and reset sendSaveNeeded(); updateGUI(); } } // END private void updateModel()