Ejemplo n.º 1
0
 public void returnDeleteLowVersionDialogValue(ReturnEvent event) {
   Integer deleteConfirm = (Integer) event.getReturnValue();
   if (deleteConfirm == 0) {
     try {
       addMultiMediaBean.setSmallThumbFileName("");
       multiMedia.setSmallThumbnail(null);
       multiMedia.setSmallThumbSystemic(true);
     } catch (Exception e) {
       e.printStackTrace();
       ErrorReportingUtils.getInstance().reportError(e);
     }
   }
 }
Ejemplo n.º 2
0
 public void uploadLowVersion(ValueChangeEvent event) {
   try {
     UploadedFile file = (UploadedFile) event.getNewValue();
     if (file != null) {
       addMultiMediaBean.setSmallThumbFileName(
           file.getFilename() + "(" + String.valueOf(file.getLength()) + " Bytes" + ")");
       MultiMediaFile mediaFile = CMSUtil.uploadFile(file);
       multiMedia.setSmallThumbnail(mediaFile);
       uploading = true;
       multiMedia.setSmallThumbSystemic(false);
     }
   } catch (IOException e) {
     e.printStackTrace();
   }
 }