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; }
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; }