I have a Grid with S3 Item and previously addItemClickListener worked with same vaadin version, I have followed Microsoft blog for O365 Authentication and addItemClickListener functionality is not getting called and setItems also not showing for dropdown. Previously it was working as designed.
Any inputs please, below is code am using
private Component getGrid() {
fileControl = new Grid<>(S3Item.class);
fileControl.setHeightFull();
fileControl.setMinWidth(“15%”);
fileControl.setWidth(“20%”);
fileControl.removeAllColumns();
fileControl.addColumn(S3Item::getName).setHeader("Name");
fileControl.addItemClickListener(e -> {
S3Item selectedFile = e.getItem();
if(selectedFile != null) {
loadFile(selectedFile);
}
});
return fileControl;
}
private void populateFileList(String environmentKey) {
try {
fileControl.setItems(Collections.emptyList());
editorControl.setValue("");
activeEnvironment = new S3Environment(environmentKey);
fileControl.setItems(activeEnvironment.getFiles(s3Client, environmentKey));
Notification notification =
Notification.show("Environment " + environmentKey + " loaded");
add(notification);
} catch(Exception e) {
Notification notification =
Notification.show("An error occured while loading files for the environment: " + e.getMessage());
add(notification);
}
}