getUnitsList(subUnit, index + 1, buffer);
if(subUnit.isActive(prepareCurrentDate())){ getUnitsList(subUnit, index + 1, buffer); }
    private void getUnitsList(IUnit parentUnit, int index, StringBuffer buffer) {        buffer.append("<li>").append("<a href=\"").append(getContextPath()).append(                "/departmentAdmOffice/functionsManagement/chooseFunction.faces?personID=").append(                personID).append("&unitID=").append(parentUnit.getIdInternal()).append("\">").append(                parentUnit.getName()).append("</a>").append("</li>").append("<ul>");        for (IUnit subUnit : parentUnit.getSubUnits()) {            getUnitsList(subUnit, index + 1, buffer);        }        buffer.append("</ul>");    }