ItEr49S04ValidacionEProbasFuncionaisItEr48S04: [Bug #358] Fixed problem saving advances types.

This commit is contained in:
Manuel Rego Casasnovas 2010-03-04 15:44:36 +01:00 committed by Javier Moran Rua
parent 25e6ae8aef
commit 40e42873ae

View file

@ -162,12 +162,14 @@ public class AdvanceTypeCRUDController extends GenericForwardComposer {
return newConstraint;
}
private void save() {
private boolean save() {
try {
advanceTypeModel.save();
messagesForUser.showMessage(Level.INFO, _("Advance type saved"));
return true;
} catch (ValidationException e) {
messagesForUser.showInvalidValues(e);
return false;
}
}
@ -236,12 +238,15 @@ public class AdvanceTypeCRUDController extends GenericForwardComposer {
}
public void saveAndExit() {
save();
goToList();
if (save()) {
goToList();
}
}
public void saveAndContinue() {
save();
if (save()) {
goToEditForm(getAdvanceType());
}
}
public boolean isImmutable() {