<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2013-2-26 下午2:37:49  
    $Revision: 1.0  
    $Purpose: SQL校验
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="bmLink_validate_sql" model="hls.HLS055.hls_fin_calc_config_validate_sql" modelaction="execute"/>
        <script type="text/javascript"><![CDATA[
        function sqlValidate_finish()
        {
            var ds = $('sqlValidateDs');
            var record = ds.getAt(0);
            Leaf.request({
                url: $('bmLink_validate_sql').getUrl(),
                para: {
                    sql_text: record.get('sql_text')
                },
                success: function(res) {
            		$('${/parameter/@lovid}').commit(record);
                },
                scope: this
            });
        }
        
        ]]></script>
        <a:dataSets>
            <a:dataSet id="sqlValidateDs" autoCreate="true">
                <a:fields>
                    <a:field name="sql_text"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <script type="text/javascript"><![CDATA[
        		function init_sqlValidateDs()
        		{
        		    var record = $('sqlValidateDs').getAt(0);
    		        record.set('sql_text',$('${/parameter/@ds_name}').getCurrentRecord().get('validation_sql'));
        		}
        		
        		init_sqlValidateDs();
    	]]></script>
        <a:screenBody>
            <a:form>
                <a:textArea name="sql_text" bindTarget="sqlValidateDs" height="250" width="550"/>
            </a:form>
            <a:hBox>
                <a:button click="sqlValidate_finish" text="GLD107.BUTTON.FINISH"/>
            </a:hBox>
        </a:screenBody>
    </a:view>
</a:screen>
