params.put("file", filename);
if (null != file) {
File serverFile = file.getServerFile();
if (null != serverFile) {
Endpoint endpoint = ((FileServiceAccessor)accessor).findEndpointBean();
IFileType ift = (IFileType) ((FileServiceAccessor)accessor).findService();
try {
ift.uploadFile(endpoint, serverFile, this, params);
refresh();
} catch (CloneNotSupportedException e) {
throw new FacesExceptionEx(e, "Failed to upload file to {0}", endpoint.getLabel());
}
}
}
}
}