public String getAsString(FacesContext facesContext, UIComponent uIComponent, Object value) {

    String fullAppNm = "";
    if (value != null && !value.equals("")) {
      fullAppNm =
          PermitService.getPermitService()
              .getProjInfoDTO(new Long(value.toString()))
              .getFullAppNo();
    }
    return fullAppNm;
  }
  public void searchDocuments() {
    prmtSequenceDtls = null;
    srchDocList = new ArrayList<ImageInfoDTO>();
    List<String> imgLst = new ArrayList<String>();
    if ((getSrchCmplncItemId() != null) && (getSrchCmplncItemId() != 0)) {
      curId = 0;

      if (srchFilters.length == 11) {
        srchDocList.addAll(
            DocumentService.getDocumentService().getAllItemImages(getSrchCmplncItemId()));
      } else {
        for (int i = 0; i < srchFilters.length; i++) {
          switch (srchFilters[i].intValue()) {
            case 2: // srchDocList.addAll(DocumentService.getDocumentService().getLetterImages(curId));
              imgLst.add("Correspondence");
              break;
            case 3: // srchDocList.addAll(DocumentService.getDocumentService().getComplianceImages(curId));
              imgLst.add("Compliance");
              break;
          }
        }
        if (imgLst.size() > 0 && null != this.srchDocList) {
          srchDocList.addAll(
              DocumentService.getDocumentService().getItemImages(imgLst, getSrchCmplncItemId()));
        }
      }

    } else if (((getPrmtNo() != null) && (getPrmtNo() != 0))) {
      if (getSeqNo() == null || getSeqNo() == 0) {
        PermitService prmtService = PermitService.getPermitService();
        prmtSequenceDtls = prmtService.getHistory(getPrmtNo());
      } else {
        curId = PermitService.getPermitService().getCurId(getPrmtNo(), getSeqNo());

        if (srchFilters.length == 11) {
          srchDocList.addAll(DocumentService.getDocumentService().getAllImages(curId));
        } else {
          for (int i = 0; i < srchFilters.length; i++) {
            switch (srchFilters[i].intValue()) {
              case 1: // srchDocList.addAll(DocumentService.getDocumentService().getAppSubmittalImages(curId));
                imgLst.add("AppSubmittal");
                break;
              case 2: // srchDocList.addAll(DocumentService.getDocumentService().getLetterImages(curId));
                imgLst.add("Letter");
                break;
              case 3: // srchDocList.addAll(DocumentService.getDocumentService().getComplianceImages(curId));
                imgLst.add("Compliance");
                break;
              case 4: // srchDocList.addAll(DocumentService.getDocumentService().getTSRImages(curId));
                imgLst.add("TSR");
                break;
              case 5:
                imgLst.add("RAI");
                break;
              case 6:
                imgLst.add("Permit");
                break;
              case 7:
                imgLst.add("FinalApproved");
                break;
              case 8:
                imgLst.add("NoticeLetter");
                break;
              case 9:
                imgLst.add("WorkLog");
                break;
              case 10:
                imgLst.add("ComplianceSubmittal");
                break;
              case 11:
                imgLst.add("DraftLetter");
                break;
            }
          }
          if (imgLst.size() > 0 && null != this.srchDocList) {
            srchDocList.addAll(DocumentService.getDocumentService().getImages(imgLst, curId));
          }
        }
      }
    }
    if (srchDocList.size() == 0) {
      this.addMessage(FacesMessage.SEVERITY_INFO, " No Results Found ");
    }
  }