I have problem with my combobox. When I select an item from my combobox it does not go to my addSelectionListener except for the first time when the program starts. How to make it take the user's selection.
here is the code:
private Tirage tirage;
private ComboBox<Tirage> comboBoxTir2;
List<Tirage> tirages;
tirages = tirageService.findByTirageFutur(produit.getId(), envService.getDateLogique());
comboBoxTir2 = new ComboBox<>();
comboBoxTir2.setItems(tirages);
comboBoxTir2.setItemCaptionGenerator(Tirage::getNoTirage);
comboBoxTir2.addSelectionListener(event -> {
tirage = event.getValue();
});
sectionVerticalPage.addComponent(comboBoxTir2);
Can anyone help me ?