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 @@ - +