voting questions flow fixed (removed button cancel)

android-scanner
Laura Radaelli 2017-06-14 19:15:13 +03:00
parent f813cf49ee
commit 24b111a20b
2 changed files with 10 additions and 2 deletions

View File

@ -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()

View File

@ -4,12 +4,11 @@
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Text?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="meerkat.voting.gui.controllersFX.VotingController">
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="meerkat.voting.gui.controllersFX.VotingController">
<children>
<Button layoutX="469.0" layoutY="343.0" mnemonicParsing="false" onMousePressed="#nextQuestion" text="Next" />
<Text fx:id="question" layoutX="84.0" layoutY="89.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Click 'Next' to see the first question." wrappingWidth="431.3046875" />
<Pane fx:id="questionPane" layoutX="84.0" layoutY="97.0" prefHeight="234.0" prefWidth="422.0" />
<Button layoutX="275.0" layoutY="343.0" mnemonicParsing="false" onMousePressed="#doCancel" text="Cancel" />
<Button layoutX="84.0" layoutY="343.0" mnemonicParsing="false" onMousePressed="#goBack" text="Back" />
</children>
</Pane>