<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.tool.SzDateHelp" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ include file="sessionInfo2.jsp"%>
<%
  String strLevel = "../../";
%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
<style type="text/css">
  .readClass {
      background:#D4D0C8;
      readonly;
  }
  .selectClass {
      width:70;
  }  
</style>
</head>
<%
    //获取提交的参数
    String id = SzConvert.toSpaceStr(request.getParameter("id"));
    String readonly = "";
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));
    
    BdAppendControl appendControl = new BdAppendControl();
    String s[] = new String[4];
    
    Iterator iter = null;
    String s2[] = null;
    if (!id.equals("")) {
    	s = (String[])appendControl.getMethodInfo(id);
    	iter = appendControl.getMethodArgs(id).iterator();
    } else {
    	SzConvert.initialArray(s,"");
    }
    
	
%>
<body>

<!-----上面的工具栏------>
<form name="formUpdate" method="post">
  <input type="hidden" name="oldid" value="<%=id%>">
  <input type="hidden" name="OPERATOR" value="<%=sOPERATOR%>">

<%@ include file="title.jsp"%>
<table width="100%">
  <tr>
    <td>
      <%=SzPageHelp.saveButton()%>
      <%=SzPageHelp.backButton()%>
    </td>
  </tr>
</table>

<!-----信息维护------>
<table width="600" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="3" cellspacing="0">
  <tr>
    <td class="tdClassTitle">id</td>
    <td><input type="text" name="id" class="txtClass2" value="<%=s[0]%>"></td>
  </tr>
  <tr>
    <td class="tdClassTitle">所属java类</td>
    <td><input type="text" name="className" class="txtClass2" value="<%=s[2]%>"></td>
  </tr>
  <tr>
    <td class="tdClassTitle">方法名称</td>
    <td><input type="text" name="methodName" class="txtClass2" value="<%=s[1]%>"></td>
  </tr>
  <tr>
    <td class="tdClassTitle">说明</td>
    <td><input type="text" name="desc" class="txtClass2" value="<%=s[3]%>"></td>
  </tr>    
</table>
<table width="600" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="3" cellspacing="0">
  <tr>
    <td>参数类型</td>  
    <td>传值类型</td> 
    <td>值</td>    
    <td>说明</td>       
  </tr>
<%
  String s_id[] = {"value","field"};
  String s_name[] = {"传值","字段名"};
  int i = 0;
  while (i<5) {
	  s2 = new String[4];
	  if (iter != null && iter.hasNext()) {
	  	  s2 = (String[])iter.next();
	  } 
	  if (s2 == null || s2[0] == null || s2[0].equals("") ) {
		  s2 = new String[4];
		  SzConvert.initialArray(s2, "");
	  }

	  i++;
%>
  <tr>
    <td><input type="text" name="className_<%=i %>" class="txtClass1" value="<%=s2[0]%>"></td>
    <td><%=SzPageHelp.radio("type_" + i, s_id, s_name, s2[1]) %></td>
    <td><input type="text" name="value_<%=i %>" class="txtClass120" value="<%=s2[2]%>"></td>
    <td><input type="text" name="desc_<%=i %>" class="txtClass1" value="<%=s2[3]%>"></td>        
  </tr>
<%	  
  }
%>
  <input type="hidden" name="count" value="<%=i %>">
</table>
</form>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
</form>
<script language="javascript" src="../../share/js/commonTool.js"></script>
<script language="javascript">

  function FormSave(formName, url) {

    //检查是否可以保存
    if (!notSpace(formName.id, "ID")) {
      return false;
    }
    if (!notSpace(formName.className, "所属java类")) {
      return false;
    }     
    if (!notSpace(formName.methodName, "方法名称")) {
      return false;
    }    

    formName.action = "append_control.jsp";
    formName.submit();
  }
  
 
</script>
</body>
