Example #1
0
  private void fillSpreadSheet(
      final Collection<CerimonyInquiryPerson> requests, final StyledExcelSpreadsheet sheet) {

    setHeaders(sheet);

    for (CerimonyInquiryPerson inquiryPerson : requests) {
      final Person person = inquiryPerson.getPerson();
      final CerimonyInquiryAnswer inquiryAnswer = inquiryPerson.getCerimonyInquiryAnswer();

      sheet.newRow();
      sheet.addCell(person.getUsername());
      sheet.addCell(person.getName());
      sheet.addCell(person.getEmail());
      final StringBuilder contacts = new StringBuilder();
      for (final PartyContact partyContact : person.getPartyContactsSet()) {
        if (partyContact instanceof Phone || partyContact instanceof MobilePhone) {
          if (contacts.length() > 0) {
            contacts.append(", ");
          }
          contacts.append(partyContact.getPresentationValue());
        }
      }
      sheet.addCell(contacts.toString());
      sheet.addCell((inquiryAnswer != null ? inquiryAnswer.getText() : new String("-")));
      sheet.addCell(getDegrees(person));
      sheet.addCell(inquiryPerson.getComment());
    }
  }
Example #2
0
 public ActionForward deleteInquiryAnswer(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   final CerimonyInquiryAnswer cerimonyInquiryAnswer =
       getDomainObject(request, "cerimonyInquiryAnswerId");
   final CerimonyInquiry cerimonyInquiry = cerimonyInquiryAnswer.getCerimonyInquiry();
   cerimonyInquiryAnswer.delete();
   RenderUtils.invalidateViewState();
   return forwardToInquiry(mapping, request, "viewAlumniCerimonyInquiry", cerimonyInquiry);
 }