From 24b111a20ba81b3832b0f905f29be892ec131816 Mon Sep 17 00:00:00 2001 From: Laura Radaelli Date: Wed, 14 Jun 2017 19:15:13 +0300 Subject: [PATCH] voting questions flow fixed (removed button cancel) --- .../voting/gui/controllersFX/VotingController.java | 9 +++++++++ voting-booth-gui/src/main/resources/views/voting.fxml | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/voting-booth-gui/src/main/java/meerkat/voting/gui/controllersFX/VotingController.java b/voting-booth-gui/src/main/java/meerkat/voting/gui/controllersFX/VotingController.java index 261a1f6..edd431f 100644 --- a/voting-booth-gui/src/main/java/meerkat/voting/gui/controllersFX/VotingController.java +++ b/voting-booth-gui/src/main/java/meerkat/voting/gui/controllersFX/VotingController.java @@ -34,6 +34,14 @@ public class VotingController { @FXML private Text question; @FXML private Pane questionPane; + @FXML + public void initialize() { + questions = command.getQuestions(); + answerGroup = new ToggleGroup(); + showQuestion(); + } + + @FXML private void nextQuestion() { if (questions.size()==0) { @@ -75,6 +83,7 @@ public class VotingController { @FXML private void doCancel() throws VoterCancelThrowable{ + // TODO: 6/14/2017 check flow and decide what to do... VoterCancelThrowable e = new VoterCancelThrowable(); command.getCallback().onFailure(e); //see what is done in the original (basically need to call the callback of the command onFailure() diff --git a/voting-booth-gui/src/main/resources/views/voting.fxml b/voting-booth-gui/src/main/resources/views/voting.fxml index 38789ea..bc11ae0 100644 --- a/voting-booth-gui/src/main/resources/views/voting.fxml +++ b/voting-booth-gui/src/main/resources/views/voting.fxml @@ -4,12 +4,11 @@ - +