FXML-LoginDemo reset button no longer clears all the data

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P3
    • None
    • Affects Version/s: 8
    • Component/s: javafx

      The FXMl-LoginDemo includes the following in Profile.fxml:

                   <Label id="Label" font="$x1" text="Email:" GridPane.columnIndex="0" GridPane.margin="$x3" GridPane.rowIndex="3" />
                      <TextField fx:id="email" minWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="3" />
                      <Label id="Label" font="$x1" text="Phone:" GridPane.columnIndex="0" GridPane.margin="$x3" GridPane.rowIndex="4" />
                      <TextField fx:id="phone" minWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="4" />
                      <Label id="Label" font="$x1" text="Address:" GridPane.columnIndex="0" GridPane.rowIndex="5" GridPane.valignment="TOP">
                        <GridPane.margin>
                          <Insets top="8.0" />
                        </GridPane.margin>
                      </Label>
                      <TextArea fx:id="address" maxHeight="82.0" minHeight="82.0" minWidth="200.0" prefHeight="82.0" GridPane.columnIndex="1" GridPane.rowIndex="5" />
                      <CheckBox id="" fx:id="subscribed" GridPane.columnIndex="1" GridPane.rowIndex="6">
                        <font>
                          <Font size="16.0" fx:id="x2" />
                        </font>
                        <GridPane.margin>
                          <Insets left="1.0" />
                        </GridPane.margin>
                      </CheckBox>

      And In ProfilerController.java, there is:

         public void resetProfile(ActionEvent event){
              if (application == null){
                  return;
              }
              email.setText("");
              phone.setText("");
              subscribed.setSelected(false);
              address.setText("");
              success.setOpacity(0.0);
              
          }

      When the user selects the "Reset" button on the sample screen, ProfileController.resetProfile() is invoked. But it looks like even though all of the method is run, only the "email" is reset to "" on the Profile page. If I comment out email.setText(""), then only only "phone" is reset to "".

            Assignee:
            Milan Kubec
            Reporter:
            Debra Masada (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: