Пример #1
0
  // 修改
  public String input() {
    List<DepModel> depList = depEbi.getAll();
    put("depList", depList);
    // 查询角色列表
    List<RoleModel> roleList = roleEbi.getAll();
    put("roleList", roleList);

    // 新建/修改:判断是否有uuid
    if (emp.getUuid() != null) {
      emp = empEbi.getByUuid(emp.getUuid());

      // roleUuids初始化为空
      // TODO checklist name 属性 必须是数组
      // 下面这段代码的主要作用:用于checklist的回显
      roleUuids = new Long[roleList.size()];
      int i = 0;
      for (RoleModel rm : roleList) {
        roleUuids[i++] = rm.getUuid();
      }
    }
    return INPUT;
  }