コード例 #1
0
ファイル: StudentWindow.java プロジェクト: hebut/jxkh
 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();
 }
コード例 #2
0
ファイル: StudentWindow.java プロジェクト: hebut/jxkh
  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);
          }
        });
  }
コード例 #3
0
ファイル: RoleTreeComposer.java プロジェクト: hebut/jxkh
 /**
  *
  * <li>功能描述:加载角色树。 void
  *
  * @author DaLei
  */
 public void loadTree() {
   List<WkTRole> tlist = roleService.getChildRole(Long.parseLong("0"));
   ttm = new DeptRoleTreeModel(tlist, roleService, userDeptList);
   roleTree.setModel(ttm);
 }