mirror of
https://github.com/AJMicke/KickerELO.git
synced 2026-03-11 13:31:02 +01:00
views: Reset input fields after successful save
This commit is contained in:
committed by
AJMicke
parent
818a0bced3
commit
e596cdd9c4
@@ -38,6 +38,9 @@ public class Enter1vs1View extends VerticalLayout {
|
|||||||
try {
|
try {
|
||||||
eloService.enterResult1vs1(winnerSelect.getValue(), loserSelect.getValue(), loserGoals.getValue().shortValue());
|
eloService.enterResult1vs1(winnerSelect.getValue(), loserSelect.getValue(), loserGoals.getValue().shortValue());
|
||||||
Notification.show("Gespeichert").addThemeVariants(NotificationVariant.LUMO_SUCCESS);
|
Notification.show("Gespeichert").addThemeVariants(NotificationVariant.LUMO_SUCCESS);
|
||||||
|
winnerSelect.setValue(null);
|
||||||
|
loserSelect.setValue(null);
|
||||||
|
loserGoals.setValue(0);
|
||||||
} catch (NoSuchPlayerException err) {
|
} catch (NoSuchPlayerException err) {
|
||||||
Notification.show("Unbekannter Spieler").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
Notification.show("Unbekannter Spieler").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
||||||
} catch (DuplicatePlayerException err) {
|
} catch (DuplicatePlayerException err) {
|
||||||
@@ -47,7 +50,9 @@ public class Enter1vs1View extends VerticalLayout {
|
|||||||
} catch (InvalidDataException err) {
|
} catch (InvalidDataException err) {
|
||||||
Notification.show("Verliertore falsch").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
Notification.show("Verliertore falsch").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
||||||
}
|
}
|
||||||
|
e.getSource().setEnabled(true);
|
||||||
});
|
});
|
||||||
|
saveButton.setDisableOnClick(true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,11 @@ public class Enter2vs2View extends VerticalLayout {
|
|||||||
try {
|
try {
|
||||||
eloService.enterResult2vs2(winnerFrontSelect.getValue(), winnerBackSelect.getValue(), loserFrontSelect.getValue(), loserBackSelect.getValue(), loserGoals.getValue().shortValue());
|
eloService.enterResult2vs2(winnerFrontSelect.getValue(), winnerBackSelect.getValue(), loserFrontSelect.getValue(), loserBackSelect.getValue(), loserGoals.getValue().shortValue());
|
||||||
Notification.show("Gespeichert").addThemeVariants(NotificationVariant.LUMO_SUCCESS);
|
Notification.show("Gespeichert").addThemeVariants(NotificationVariant.LUMO_SUCCESS);
|
||||||
|
winnerFrontSelect.setValue(null);
|
||||||
|
winnerBackSelect.setValue(null);
|
||||||
|
loserFrontSelect.setValue(null);
|
||||||
|
loserBackSelect.setValue(null);
|
||||||
|
loserGoals.setValue(0);
|
||||||
} catch (NoSuchPlayerException err) {
|
} catch (NoSuchPlayerException err) {
|
||||||
Notification.show("Unbekannter Spieler").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
Notification.show("Unbekannter Spieler").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
||||||
} catch (DuplicatePlayerException err) {
|
} catch (DuplicatePlayerException err) {
|
||||||
@@ -54,7 +59,9 @@ public class Enter2vs2View extends VerticalLayout {
|
|||||||
} catch (InvalidDataException err) {
|
} catch (InvalidDataException err) {
|
||||||
Notification.show("Verliertore falsch").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
Notification.show("Verliertore falsch").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
||||||
}
|
}
|
||||||
|
e.getSource().setEnabled(true);
|
||||||
});
|
});
|
||||||
|
saveButton.setDisableOnClick(true);
|
||||||
|
|
||||||
|
|
||||||
// Use custom CSS classes to apply styling. This is defined in
|
// Use custom CSS classes to apply styling. This is defined in
|
||||||
|
|||||||
Reference in New Issue
Block a user