use of com.haulmont.cuba.web.toolkit.ui.CubaFileUpload in project cuba by cuba-platform.
the class WebFileUploadField method setDropZone.
@Override
public void setDropZone(DropZone dropZone) {
super.setDropZone(dropZone);
if (uploadButton instanceof CubaFileUpload) {
if (dropZone == null) {
((CubaFileUpload) uploadButton).setDropZone(null);
} else {
com.haulmont.cuba.gui.components.Component target = dropZone.getTarget();
if (target instanceof Window.Wrapper) {
target = ((Window.Wrapper) target).getWrappedWindow();
}
Component vComponent = target.unwrapComposition(Component.class);
((CubaFileUpload) uploadButton).setDropZone(vComponent);
}
}
}
Aggregations