Ignore:
Timestamp:
08/21/12 12:53:20 (13 years ago)
Author:
mcichenski
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GanntChart.java

    r422 r423  
    154154            } 
    155155 
    156             //String fileDownloadServletUrl = FileDownloadServlet.getResourceUrl(); 
    157  
    158             for (FileLocation fileLocation : fileLocationList) { 
    159  
     156            ServletContext servletContext = FlexContext.getServletContext(); 
     157             
     158            for (FileLocation fileLocation : fileLocationList) {                 
    160159                HashMap<String, String> fileLocationItem = new HashMap<String, String>(); 
    161160                fileLocationItemList.add(fileLocationItem); 
     
    194193                fileLocationItem.put("folderUrl", folderLocation.getUrl()); 
    195194                 
    196                 // Download url 
    197                 if (fileType.equals(FileType.FILE)) { 
    198                     //fileLocationItem.put("fileDownloadUrl", FileDownloadServlet.getResourceUrlForFileLocation(fileLocation, false)); 
     195                String contentType = servletContext.getMimeType(fileLocation.getFileName().toLowerCase()); 
     196                String openUrl = null; 
     197                if (contentType != null) { 
     198                    openUrl = VineFlexUtilClass.getURL(fileLocation, contentType); 
     199                } else { 
     200                    openUrl = VineFlexUtilClass.getDownloadURL(fileLocation); 
    199201                } 
     202                fileLocationItem.put("fileAccessUrl", openUrl); 
    200203            } 
    201204 
Note: See TracChangeset for help on using the changeset viewer.