Changeset 423 for gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java
- Timestamp:
- 08/21/12 12:53:20 (13 years ago)
- 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 154 154 } 155 155 156 //String fileDownloadServletUrl = FileDownloadServlet.getResourceUrl(); 157 158 for (FileLocation fileLocation : fileLocationList) { 159 156 ServletContext servletContext = FlexContext.getServletContext(); 157 158 for (FileLocation fileLocation : fileLocationList) { 160 159 HashMap<String, String> fileLocationItem = new HashMap<String, String>(); 161 160 fileLocationItemList.add(fileLocationItem); … … 194 193 fileLocationItem.put("folderUrl", folderLocation.getUrl()); 195 194 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); 199 201 } 202 fileLocationItem.put("fileAccessUrl", openUrl); 200 203 } 201 204
Note: See TracChangeset
for help on using the changeset viewer.