コード例 #1
0
 public void returnDeleteHighVersionDialogValue(ReturnEvent event) {
   Integer deleteConfirm = (Integer) event.getReturnValue();
   if (deleteConfirm == 0) {
     try {
       addMultiMediaBean.setLargeThumbFileName("");
       multiMedia.setLargeThumbnail(null);
       multiMedia.setLargeThumbSystemic(true);
     } catch (Exception e) {
       e.printStackTrace();
       ErrorReportingUtils.getInstance().reportError(e);
     }
   }
 }
コード例 #2
0
 public void uploadHighVersion(ValueChangeEvent event) {
   try {
     UploadedFile file = (UploadedFile) event.getNewValue();
     if (file != null) {
       addMultiMediaBean.setLargeThumbFileName(
           file.getFilename() + "(" + String.valueOf(file.getLength()) + " Bytes" + ")");
       MultiMediaFile mediaFile = CMSUtil.uploadFile(file);
       multiMedia.setLargeThumbnail(mediaFile);
       uploading = true;
       multiMedia.setLargeThumbSystemic(false);
     }
   } catch (IOException e) {
     e.printStackTrace();
   }
 }