首页 > 代码库 > 胖客户端组织树
胖客户端组织树
//OrgTreePanel是一个panelorgTree = new OrgTreePanel(TcApp.getSession());contentPanel.add(orgTree, BorderLayout.CENTER);//获取选中的东西OrgObject orgObject = orgTree.getSelectedObject();if (orgObject == null) return;if (orgObject.getComponent() instanceof TCComponentGroupMember) { // 得到当前选择的用户对象完整组织结构 TCComponentGroupMember fMember = (TCComponentGroupMember) orgObject .getComponent(); try { TCComponentGroup group = fMember.getGroup(); TCComponentUser user = fMember.getUser(); System.out.println(group + "-" + user); } catch (TCException e1) { e1.printStackTrace(); }} /** * 获取当前选中的人员ID * @return */ public String getSelectUserID(){ String userID = null; try { OrgObject orgObject = orgTree.getSelectedObject(); if (orgObject != null && orgObject.getType() == OrgObject.GROUPMEMBER) { TCComponentUser user = orgObject.getUser(); userID = user.getProperty("user_id"); } } catch (TCException e) { e.printStackTrace(); } return userID; }
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。