Rename groupNameBar to groupNameField
This commit is contained in:
parent
3d6a38e354
commit
920c83c4d1
@ -30,7 +30,7 @@ public class GroupCreationScene {
|
||||
private Button createButton;
|
||||
|
||||
@FXML
|
||||
private TextField groupNameBar;
|
||||
private TextField groupNameField;
|
||||
|
||||
@FXML
|
||||
private ListView<Contact> contactList;
|
||||
@ -74,10 +74,10 @@ public class GroupCreationScene {
|
||||
*/
|
||||
@FXML
|
||||
private void createButtonClicked() {
|
||||
final var name = groupNameBar.getText();
|
||||
final var name = groupNameField.getText();
|
||||
if (!Bounds.isValidContactName(name)) {
|
||||
new Alert(AlertType.ERROR, "The entered group name is not valid (" + Bounds.CONTACT_NAME_PATTERN + ")").showAndWait();
|
||||
groupNameBar.clear();
|
||||
groupNameField.clear();
|
||||
} else {
|
||||
eventBus.dispatch(new SendEvent(new GroupCreation(name,
|
||||
contactList.getSelectionModel().getSelectedItems().stream().map(Contact::getID).collect(Collectors.toSet()))));
|
||||
|
@ -14,7 +14,7 @@
|
||||
<children>
|
||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<TextField fx:id="groupNameBar" prefColumnCount="22" promptText="Enter Group Name">
|
||||
<TextField fx:id="groupNameField" prefColumnCount="22" promptText="Enter Group Name">
|
||||
<HBox.margin>
|
||||
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||
</HBox.margin>
|
||||
|
Reference in New Issue
Block a user