public int doStartTag() throws JspException {

    personnelMgr = (PersonnelMgr) pageContext.getSession().getAttribute("personnelMgr");

    iterator = personnelMgr.getCurrentEmployee().getSpecialSkillList().iterator();
    if (personnelMgr.getCurrentEmployee().getSpecialSkillList().size() == 0) {
      return SKIP_BODY;
    }

    return IterationTag.EVAL_BODY_AGAIN;
  }
Exemplo n.º 2
0
  /** Holds value of propertys navigatorName. */
  public int doStartTag() throws JspException {

    PersonnelMgr personnelMgr =
        (PersonnelMgr) pageContext.getSession().getAttribute("personnelMgr");
    EmployeeIncomeTax incomeTax = personnelMgr.getCurrentEmployee().getCurrentEmployeeIncomeTax();
    if (incomeTax == null) {
      return Tag.SKIP_BODY;
    }
    pageContext.setAttribute(
        "incomeTaxName", incomeTax.getCurrentIncomeTaxType().getAttributeName());
    pageContext.setAttribute("withhold", incomeTax.getWithhold());
    pageContext.setAttribute(
        "employeeIncomeTaxId",
        incomeTax.getEmployeeIncomeTaxId() == null ? "" : incomeTax.getEmployeeIncomeTaxId());
    pageContext.setAttribute(
        "incomeTaxError",
        incomeTax.isValid("incomeTaxError") ? "" : incomeTax.getMessage("incomeTaxError"));
    pageContext.setAttribute(
        "withholdError", incomeTax.isValid("withhold") ? "" : incomeTax.getMessage("withhold"));
    pageContext.setAttribute(
        "isIncomeTaxExist",
        incomeTax.getIsIncomeTaxExist().equals("") ? "" : incomeTax.getIsIncomeTaxExist());

    //        pageContext.setAttribute("specialSkillId", "");
    //        pageContext.setAttribute("specialSkillCode", "");
    //
    // pageContext.setAttribute("specialSkillName",specialSkill.getCurrentSkill().getAttributeName()==null? "":specialSkill.getCurrentSkill().getAttributeName());
    //
    // pageContext.setAttribute("specialSkillCategoryName",specialSkill.getCurrentSkill().getSkillCategory()==null? "":specialSkill.getCurrentSkill().getSkillCategory().getAttributeName());
    //        pageContext.setAttribute("specialSkillDescription",
    // specialSkill.getSkillDescription());
    //        pageContext.setAttribute("skillError", specialSkill.isValid("isSkillSelected")? "" :
    // specialSkill.getMessage("isSkillSelected"));
    //        pageContext.setAttribute("specialSkillAcquiredDate", specialSkill.getAcquiredDate());
    //        pageContext.setAttribute("specialSkillAcquiredDateError",
    // specialSkill.isValid("acquiredDate")? "" : specialSkill.getMessage("acquiredDate"));
    //
    return EVAL_BODY_INCLUDE;
  }