<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="x"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<script type="text/javascript">
//var dataSource=$('#dataSource',div).val();
//dataSource=$.trim(dataSource);

/*$('#receiveField').remotebox({
	name:receiveField,
	checkbox:true,
	back:{
		value:$('#backFields'),
		text:$('#receiveField')
	},
	valueIndex:'#backFields'
});
*/
	 var tableName="${paramSourceTables}"; 
	
	$('#backFields').searchbox({
	    type: 'saf',
	    name: 'selectTableFields',
	    checkbox:true,
	    checkboxIndex:'fieldCode',

	    getParam: function () {
	        return {
	        	tableName: tableName
	        };
	    },
	    back: {
	        // metaName : '#codeRuleId',
	        fieldCode: '#backFields_text',
	      //  fieldName: '#receiveField'
	    },
	    valueIndex:'#fieldCode',//进入下拉列表 默认勾选上 
	    onChange: function () {
	    }
	});
	 $('#backFields_text').val($('#backFields').val());
/*
$('#sourceField').remotebox({
	name:sourceField,
	checkbox:true,
	back:{
		value:$('#paramSourceFields'),
		text:$('#sourceField')
	}
});*/
$('#paramSourceFields').searchbox({
    type: 'saf',
    name: 'selectTableFields',
    checkbox:true,
    checkboxIndex:'fieldCode',

    getParam: function () {
        return {
        	tableName: tableName
        };
    },
    back: {
        // metaName : '#codeRuleId',
        fieldCode: '#paramSourceFields_text',
      //  fieldName: '#receiveField'
    },
    valueIndex:'#fieldCode',//进入下拉列表 默认勾选上 
    onChange: function () {
    }
});
 $('#paramSourceFields_text').val($('#paramSourceFields').val());

</script>
</head>
<body>
<form class="hg-form" method="post" action="" id="selectCustomForm">
	  <x:hidden name="id" />
	  <x:hidden name="targetField" />
	  <x:hidden name="formNo" />
	  <x:hidden name="tableName" />
	  <x:hidden name="paramSourceTables" />
      <x:hidden name="orderby" />
      
      <x:hidden name="fieldCodes"/>
	  <x:hidden name="fieldTypes"/>
	  <x:hidden name="condiColumns"/>
	  <x:hidden name="condiNames"/>
	  <x:hidden name="condiSymbols"/>
	  <x:hidden name="condiAlias"/>
	  <x:hidden name="condiTypes"/>
 <div class="hg-form-row">
    <x:inputC name="searchName"  label="query名称" maxLength="16" labelCol="2" fieldCol="2" required="true" readonly="true"/>
    <x:inputC name="searchDesc"  label="query描述" maxLength="50" labelCol="2" fieldCol="2" required="true" readonly="true" />
    <x:inputC name="searchboxType"  label="xml文件名称" maxLength="16" labelCol="2" fieldCol="2" required="true" readonly="true"/>
  </div>
   <div class="hg-form-row">
     <x:textareaC name="searchSql" label="查询的sql语句" rows="4" maxLength="2000" labelCol="2" fieldCol="10" required="true" readonly="true"/>
  </div>
  <div class="hg-form-row">
     <!-- x:textareaC name="fieldCodes" label="显示字段CODE" rows="1" maxLength="500" labelCol="2" fieldCol="10" required="true" readonly="true"/-->
     <x:textareaC name="fieldNames" label="各列显示名称" rows="1" maxLength="500" labelCol="2" fieldCol="10" required="true"/>
     <x:textareaC name="fieldWidths" label="各列显示宽度" rows="1" maxLength="500" labelCol="2" fieldCol="10" required="true"/>
   </div>
  <div class="hg-form-row">
     <!-- x:selectC name="receiveField" required="true" emptyOption="false" label="页面接收字段" list="fieldMap" labelCol="2" fieldCol="2"/-->
    <x:inputC name="backFields" label="接收字段名称"  labelCol="2" fieldCol="10" required="true" />
     
  </div>

   <div class="hg-form-row">
     <x:textareaC name="paramFields" label="SQL来源值变量" rows="1" maxLength="500" labelCol="2" fieldCol="10" required="false" readonly="true"/>
  </div>
   <div class="hg-form-row">
    <!-- x:selectC name="sourceField" required="false" emptyOption="false" label="值变量来源" list="fieldMap" labelCol="2" fieldCol="2"/>
     <x:textareaC name="paramSourceFields" label="" rows="1" maxLength="500" labelCol="1" fieldCol="7" required="false"/>-->
       <x:inputC name="paramSourceFields" label="值变量来源字段"  labelCol="2" fieldCol="10" required="false" />
  </div>
   <label>&nbsp;&nbsp;&nbsp;&nbsp;<font color=blue>说明：来源值变量是SQL中定义的以冒号开始的变量名;选择变量来源字段时注意对应关系。</font></label>
</form>
</body>
</html>
