示例#1
0
  public int doStartTag() throws JspException {

    try {
      comQuotationMgr = (ComQuotationMgr) pageContext.getSession().getAttribute("comQuotationMgr");
      iterator = comQuotationMgr.getCurrentQuotation().getCustomer().getContactList().iterator();
      if (!iterator.hasNext()) {
        return Tag.SKIP_BODY;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    return IterationTag.EVAL_BODY_AGAIN;
  }
示例#2
0
  private void setAttribute() {

    try {
      contact = (Contact) iterator.next();

      pageContext.setAttribute(
          "contactId", contact.getContactId() == null ? "" : contact.getContactId());
      pageContext.setAttribute(
          "contactName",
          contact.getContactPersonName() == null ? "" : contact.getContactPersonName());
      pageContext.setAttribute("phone", contact.getPhone() == null ? "" : contact.getPhone());
      pageContext.setAttribute("email", contact.getEmail() == null ? "" : contact.getEmail());

    } catch (Exception e) {
      e.printStackTrace();
    }
  }