<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="com.gx.webpage.framework.util.inoutformat.DataBean" %>
<%@ page import="com.gx.webpage.framework.pageconfengine.*" %>
<%@ page import="java.util.*" %>
<%
	String dType = DataBean.getStr(request, "designType");
	int designType = 0;
	if(dType!=null && dType.trim().length()>0){
		designType = Integer.parseInt(dType);
	}
  Map map = WebpageConfEngine.getInstance().getCompMap();
  Set set = map.keySet();
  Iterator it = set.iterator();
  Iterator itForScript = set.iterator();
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="StyleSheet" href="./../../../webpage/common/css/Dialog.css" type="text/css" />
<script language="javascript" src="./../../../webpage/common/engine/constant.js"></script>
<script language="JScript.Encode" src="./../../../webpage/common/engine/common.js"></script>
</HEAD>
<BODY class=innerBody>
<table border=0 width=100%>
    <tr>
        <td height=100>数据表现形式</td>
        <td colspan=2>
<script language="javascript">
  var nowTable=top.window.nowTable;
  var viewId = top.window.viewId;
	var editDocument = top.window.editDocument;
	var designType = <%=designType%>;
  function ChangeDataType(){
		var myList = document.all("dataType");
    var id = myList.value;
    var url = "";
		
    if(id=="绝对不等于"){
    }
    <%
    while(itForScript.hasNext()){
      String id = (String)itForScript.next();
      CompRegisterModel crm = (CompRegisterModel)map.get(id);
			boolean canUse = false;
			if((designType==1 && crm.getUseInModel1()) || (designType==2 && crm.getUseInModel2())
				|| (designType==3 && crm.getUseInModel3()) || (designType==4 && crm.getUseInModel4()) || designType==9){
				//
			}else{
				continue;
			}
    %>
    else if(id=="<%=id%>"){
      url = "<%=crm.getOriginDesignPath()%>"+"/designControl.html";
      viewId="<%=crm.getId()%>";
    }
    <%}%>
		var params = new Array();
		params[0] = nowTable;
		params[1] = editDocument;
		params[2] = designType;
    var retV = CHILDWIN.showMDialog(url, params, 600, 600);
    if(viewId!=null){
      top.window.viewId = viewId;
    }
    if(retV!=null){
      top.window.nowTable = retV;
    }
  }
</script>
<select size="10" id="dataType" name="dataType" ondblclick="ChangeDataType();" style="WIDTH: 250px">
<%
  while(it.hasNext()){
    String id = (String)it.next();
    CompRegisterModel crm = (CompRegisterModel)map.get(id);
    if(crm.getCompType() != crm.COMPTYPE_DATAMODEL){
        continue;
    }
		if((designType==1 && crm.getUseInModel1()) || (designType==2 && crm.getUseInModel2())
			|| (designType==3 && crm.getUseInModel3()) || (designType==4 && crm.getUseInModel4()) || designType==9){
			//
		}else{
			continue;
		}
%>
<script language="javascript">
		var tempId = "<%=crm.getId()%>";
		var tempSelected;
		if(tempId == viewId){
			tempSelected = "selected";
		}else{
			tempSelected = "";
		}
		document.write('<option  value="<%=crm.getId()%>" '+tempSelected+'><%=crm.getName()%></option>');
</script>		
<%}%>
</select>
<br><br>
<input type=button value="设置属性" onclick='ChangeDataType()'>
        </td>
<!--    <tr>
        <td  height=10>自定义触发事件</td>
        <td valign=top height=10>
            <select size=4 id=eventList name=eventList style="HEIGHT : 60px; WIDTH: 250px">
            </select>
        </td>
        <td valign=top  height=10>
            <input type=button value="上移" onclick="upUserEvent();">
            <input type=button value="添加" onclick="addUserEvent();"><br>
            <input type=button value="下移" onclick="downUserEvent();">
            <input type=button value="删除" onclick="delUserEvent();">
        </td>
    </tr>-->
</table>
<hr>
<!--<table width=100%>
    <tr>
        <td>数据检测的序号<input type=text id=checkIndex name=checkIndex size=4 onblur="./../../...checkInteger(this, true, 0)"></td>
    </tr>
    <tr>
        <td>数据检测失败的提示内容<br>
        <input type=text id=checkErrMsg name=checkErrMsg style="width:100%"></td>
    </tr>
    <tr>
        <td>数据检测的自定义脚本(变量md为当前数据模型的引用)<br>
            <textarea id=checkUserScript name=checkUserScript rows=4 style="width:100%"></textarea>
        </td>
    </tr>
</table>
-->
</BODY>
</HTML>
