Exemple #1
0
 public void onSelect$deptList() {
   KdId = Long.parseLong(deptList.getSelectedItem().getValue().toString());
   List rolelist = roleService.findByKdidAndKrname(KdId, "ѧÉú");
   if (rolelist.size() != 0) {
     WkTRole role = (WkTRole) rolelist.get(0);
     Role = role.getKrId();
   }
   loadTree();
   initPanel();
 }
Exemple #2
0
  public void initWindow() {
    List deptlist = departmentService.findDeptByKdidAndType(0L, "1");
    deptList.setModel(new ListModelList(deptlist));
    deptList.setItemRenderer(
        new ListitemRenderer() {
          public void render(Listitem arg0, Object arg1) throws Exception {
            WkTDept dept = (WkTDept) arg1;
            arg0.setLabel(dept.getKdName());
            arg0.setValue(dept.getKdId());
          }
        });
    deptList.getItemAtIndex(0).setSelected(true);
    WkTDept department = (WkTDept) deptlist.get(0);
    KdId = department.getKdId();
    List rolelist = roleService.findByKdidAndKrname(KdId, "ѧÉú");
    if (rolelist.size() != 0) {
      WkTRole role = (WkTRole) rolelist.get(0);
      Role = role.getKrId();
    }
    search.setDisabled(true);
    loadTree();
    initPanel();
    WkTDept dept = (WkTDept) userService.get(WkTDept.class, KdId);
    yuan.setLabel(dept.getGradeName(WkTDept.GRADE_YUAN));
    xi.setLabel(dept.getGradeName(WkTDept.GRADE_XI));
    leaderlist.setItemRenderer(
        new ListitemRenderer() {
          public void render(Listitem item, Object data) throws Exception {
            final Student stu = (Student) data;
            Listcell c1 = new Listcell(item.getIndex() + 1 + "");
            Listcell c2 = new Listcell(stu.getStId());
            Listcell c3 = new Listcell(stu.getUser().getKuName());
            Listcell c4 = new Listcell(stu.getStClass());
            Listcell c5 = new Listcell(stu.getUser().getXiDept());
            Listcell c6 = new Listcell(stu.getUser().getYuDept());
            Listcell c7 = new Listcell(stu.getUser().getKuPasswd());

            item.appendChild(c1);
            item.appendChild(c2);
            item.appendChild(c3);
            item.appendChild(c4);
            item.appendChild(c5);
            item.appendChild(c6);
            item.appendChild(c7);
          }
        });
  }
Exemple #3
0
 /**
  *
  * <li>功能描述:打开编辑角色窗口。
  *
  * @param it void
  * @author DaLei
  */
 private void openEditWindow(Treeitem it) {
   WkTRole r = (WkTRole) it.getValue();
   Executions.getCurrent().setAttribute("deptList", userDeptList);
   if (r.getKrPid().intValue() > 0) {
     Component c = creatTab("roleEdit", "角色管理", "/admin/system/role/role.zul", rolePanel);
     if (c != null) {
       rWindow = (RoleEditWindow) c;
     }
     rWindow.initWindow(r);
   } else {
     Component c = creatTab("roleEdit", "角色管理", "/admin/system/role/roleGroup.zul", rolePanel);
     if (c != null) {
       rgWindow = (RoleGroupEditWindow) c;
     }
     rgWindow.initWindow(r);
   }
 }