bug fixing manage files

This commit is contained in:
Francesco Mangiacrapa 2021-10-11 14:34:24 +02:00
parent 22e73c94ef
commit 0939a871bb
1 changed files with 11 additions and 8 deletions

View File

@ -390,13 +390,6 @@ public class UpdateFileset extends Composite {
List<WorkspaceContentDV> listWSC) {
GWT.log("fillListBoxToBeReplaced called, posizIndex: "+posizIndex+", listWSC: "+listWSC);
if (listWSC == null || listWSC.isEmpty()) {
showMessage(section + " does not contain file!", LabelType.WARNING);
pathIndex = posizIndex;
showNewFileUpload();
return;
}
if(mapWSContentListBox==null) {
mapWSContentListBox = new HashMap<Integer, List<WorkspaceContentDV>>();
}
@ -411,7 +404,7 @@ public class UpdateFileset extends Composite {
@Override
public void onChange(ChangeEvent event) {
GWT.log("listBoxContentIndex changed, posizIndex: "+posizIndex);
GWT.log("listBoxContentIndex changed, value: "+listBoxContentIndex.getSelectedValue());
if (placeholderListBoxIndex) {
listBoxContentIndex.removeItem(0); // this is the placeholder, removing it once
@ -419,6 +412,16 @@ public class UpdateFileset extends Composite {
}
int selectedIndex = listBoxContentIndex.getSelectedIndex();
GWT.log("selected index: "+selectedIndex);
List<WorkspaceContentDV> theListWC = mapWSContentListBox.get(selectedIndex);
if (theListWC == null || theListWC.isEmpty()) {
uploadFileContainer.clear();
showMessage(section + " does not contain file!", LabelType.WARNING);
pathIndex = posizIndex;
showNewFileUpload();
return;
}
showFileBrowseInteraction(selectedIndex, mapWSContentListBox.get(selectedIndex));
}
});