Browse Source

bug fixing manage files

master
Francesco Mangiacrapa 4 months ago
parent
commit
17f2c9093d
  1. 19
      src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/edit/UpdateFileset.java

19
src/main/java/org/gcube/portlets/user/geoportaldataentry/client/ui/edit/UpdateFileset.java

@ -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));
}
});

Loading…
Cancel
Save