I’m trying to show a pop-up if there is no any item in Vaadin8 combobox. But there is no getItems() or size() methods.
here is my code, if branch size = 0 I want to push a notification to user.
cbxBranch = new ComboBox<>();
cbxBranch.setPlaceholder("Select a branch");
cbxBranch.setItemCaptionGenerator(Branch::getBranchName);
cbxBranch.setEmptySelectionAllowed(false);
cbxBranch.setItems(getBranches());
cbxBranch.addFocusListener(e -> {
//this line just a sample..
System.out.println(cbxBranch.getDataProvider().size());
});