accountorgchart.jsp

来自「国外的一套开源CRM」· JSP 代码 · 共 42 行

JSP
42
字号


<%@ page import="com.sourcetap.sfa.ui.ContactTreeNode" %>
<%@ page import="java.util.Enumeration" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="javax.swing.tree.TreeNode" %>

<%@ include file="/includes/header.jsp" %>

<%
	
	try {
		String accountId = request.getParameter("accountId");
		
		HashMap fields = new HashMap();
		fields.put("accountId", accountId);
		GenericValue acctGV = delegator.findByPrimaryKey("Account", fields );
		String acctName = "";
		if ( acctGV != null )
		{
			acctName = acctGV.getString("accountName");
		}
%>
   <TABLE WIDTH="100%" CLASS="tabularSectionTitleTable">
    <TR>
     <TD WIDTH="*">
      <NOBR>Organization Chart for <%=acctName%></NOBR>
     </TD>
    </TR>
   </TABLE>
   <CENTER>
<%		
		
		ContactTreeNode root = (ContactTreeNode) ContactTreeNode.createTree(delegator,accountId);
	
		if ( root == null ) 
			out.write("no tree found\n");
		else
			root.displayHtml( out );
	}  catch(Exception e) {out.write("error\n"); out.write(e.toString());}
%>
</CENTER>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?