Exemple #1
0
 public ActionForward viewXML(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   BudgetSubAwards subAward = getSelectedBudgetSubAward(form, request);
   subAward.refreshNonUpdateableReferences();
   if (!subAward.getBudgetSubAwardFiles().isEmpty()) {
     BudgetSubAwardFiles subAwardFiles = subAward.getBudgetSubAwardFiles().get(0);
     downloadFile(
         form,
         request,
         response,
         subAwardFiles.getSubAwardXmlFileData().getBytes(),
         createXMLFileName(subAward),
         CONTENT_TYPE_XML);
   }
   return null;
 }
Exemple #2
0
 public ActionForward viewXFD(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   BudgetSubAwards subAward = getSelectedBudgetSubAward(form, request);
   subAward.refreshNonUpdateableReferences();
   if (!subAward.getBudgetSubAwardFiles().isEmpty()) {
     BudgetSubAwardFiles subAwardFiles = subAward.getBudgetSubAwardFiles().get(0);
     downloadFile(
         form,
         request,
         response,
         subAwardFiles.getSubAwardXfdFileData(),
         subAward.getSubAwardXfdFileName(),
         CONTENT_TYPE_PDF);
   } else {
     return mapping.findForward(Constants.MAPPING_BASIC);
   }
   return null;
 }