<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129 
    $Date: 2013-4-27 上午11:16:32  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
        	function configBtn_add(){
        	    $('configBtnScreen_mainDs_grid').showEditorByRecord($('configbtnScreen_mainDs').create());
        	}
        	function configBtnScreen_close(){
        	    $('hls_fin_calc_config_btn').close();
        	}
        	function configBtnScreen_save(){
        	    if($('configbtnScreen_mainDs').validate()){
        	        $('configbtnScreen_mainDs').submit();
        	    }
        	}
        	function onBtnSubmitSuccess(ds){
        	    ds.query();
        	}
        	function configBtnScreen_delete(){
        	    $('configBtnScreen_mainDs_grid').remove();
        	}
        	
        	function calc_order_editor_f(record,name)
        	{
        	    if(record.isNew)
        	    {
        	        return 'hls_btn_config_numberField';
        	    }
        	    else
        	    {
        	        return '';
        	    }
        	}
		]]></script>
        <a:dataSets>
            <a:dataSet id="configbtnScreen_mainDs" autoQuery="true" fetchAll="true" model="hls.HLS055.hls_fin_calc_button_tplt_proc" queryUrl="${/request/@context_path}/autocrud/hls.HLS055.hls_fin_calc_button_tplt_proc/query?button_code=${/parameter/@button_code}" selectable="true">
                <a:fields>
                    <a:field name="button_code" defaultValue="${/parameter/@button_code}"/>
                    <a:field name="calc_order" required="true"/>
                    <a:field name="procedure_name" required="true"/>
                </a:fields>
                <a:events>
                    <a:event name="submitsuccess" handler="onBtnSubmitSuccess"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="configBtnScreen_close" text="HLS.CLOSE"/>
                <a:gridButton click="configBtn_add" text="HLS.NEW"/>
                <a:gridButton click="configBtnScreen_delete" text="HLS.REMOVE"/>
                <a:gridButton click="configBtnScreen_save" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:grid id="configBtnScreen_mainDs_grid" bindTarget="configbtnScreen_mainDs" height="300" navBar="true" width="780">
                <a:columns>
                    <a:column name="button_code" width="60"/>
                    <a:column name="calc_order" editorFunction="calc_order_editor_f" width="60"/>
                    <a:column name="procedure_name" editor="hls_btn_config_textField" width="300"/>
                </a:columns>
                <a:editors>
                    <a:textField id="hls_btn_config_textField"/>
                    <a:numberField id="hls_btn_config_numberField" allowDecimals="false" allowNegative="false"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
