<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $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();
        	}
		]]></script>
        <a:dataSets>
            <a:dataSet id="configbtnScreen_mainDs" autoQuery="true" fetchAll="true" model="hls.HLS050.hls_fin_calc_button_proc" queryUrl="${/request/@context_path}/autocrud/hls.HLS050.hls_fin_calc_button_proc/query?price_list=${/parameter/@price_list}&amp;button_code=${/parameter/@button_code}" selectable="true">
                <a:fields>
                    <a:field name="price_list" defaultValue="${/parameter/@price_list}"/>
                    <a:field name="button_code" defaultValue="${/parameter/@button_code}"/>
                </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_save" text="HLS.SAVE"/>
                <a:gridButton click="configBtnScreen_delete" text="HLS.REMOVE"/>
            </a:screenTopToolbar>
            <a:grid id="configBtnScreen_mainDs_grid" bindTarget="configbtnScreen_mainDs" height="300" navBar="true" width="780">
                <a:columns>
                    <a:column name="price_list" width="80"/>
                    <a:column name="button_code" width="60"/>
                    <a:column name="calc_order" editor="hls_btn_config_numberField" 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>
