finished
This commit is contained in:
parent
72d87a894e
commit
46c0e9d760
@ -29,6 +29,17 @@ public class AddressBookController {
|
||||
|
||||
contacts.addListener((ListChangeListener<? super Contact>) (observable) -> updateContactCount());
|
||||
updateContactCount();
|
||||
|
||||
contactView.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if (newValue != null) {
|
||||
idField.setText(String.valueOf(newValue.getId()));
|
||||
nameField.setText(newValue.getName());
|
||||
phoneField.setText(newValue.getPhone());
|
||||
emailField.setText(newValue.getEmail());
|
||||
} else {
|
||||
clearInputFields();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Predicate<Contact> createFilterPredicate(String searchText) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user