<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LR  
    $Date: 2013-7-23 下午02:11:03  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:view>
        <script type="text/javascript"><![CDATA[
            function okbtn() {
                var record=$('validation_sql_ds').getAt(0);
            $('${/parameter/@ds_name}').findById(Number('${/parameter/@record_id}')).set('${/parameter/@name}',record.get('clob_validation_sql'));
        	window_close();
            }
            function window_close(){
            $('${/parameter/@winId}').close();
        }
            function returnok() {
                window_close();
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="validation_sql_ds" autoCreate="true"/>
        </a:dataSets>
        <a:screenBody>
            <a:form column="1" style="margin-top:10px;margin-left:10px;">
                <a:textArea name="clob_validation_sql" bindTarget="validation_sql_ds" height="320" width="500"/>
            </a:form>
            <a:hBox style="margin-left:10px;margin-bottom:20px;">
                <a:button id="okbtnid" click="okbtn" text="PROMPT.OK"/>
                <a:button click="returnok" text="PROMPT.RETURN"/>
            </a:hBox>
            <script type="text/javascript"><![CDATA[
                Leaf.onReady(function() {
                    var record = $('validation_sql_ds').getAt(0);
                    var clob_validation_sql;
                    if('${/parameter/@name}'== 'verify_sql') {
                    	 clob_validation_sql = $('${/parameter/@ds_name}').findById(${/parameter/@record_id}).get('verify_sql');
                    }else if('${/parameter/@name}'== 'approve_sql') {
                         clob_validation_sql = $('${/parameter/@ds_name}').findById(${/parameter/@record_id}).get('approve_sql');
                    }else {
                         clob_validation_sql = $('${/parameter/@ds_name}').findById(${/parameter/@record_id}).get('${/parameter/@name}');
                    }
                    record.set('clob_validation_sql', clob_validation_sql);
                });
            ]]></script>
        </a:screenBody>
    </a:view>
</a:screen>