<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangyi2652 $
    $Date: 2010/11/26 05:55:41 $
    $Revision: 1.2 $
    $Purpose:事件维护模块中的  事件消息维护 页面 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query autoCount="false" defaultWhereClause="event_name=${/parameter/@event_name}" fetchAll="false" model="sys.evt_event" rootPath="evt"/>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
        
            function onhandleValuesUpdate(ds,record,name,value){
                record.set('event_name', '${/parameter/@event_name}');
            }

            function onUpdateSuccess(dateSet, datas, results){
                Leaf.showMessage('${l:EXP_REP_PARTIALLY_SUBMITTED}','${l:PROMPT.OPERATION_SUCCESS}');
                $('handle_grid').onLoad();
            }
            
        ]]></script>
        <a:dataSets>
            <a:dataSet id="evt_event_handle_form_ds" model="sys.evt_event">
                <a:datas dataSource="/model/evt"/>
                <a:fields>
                    <a:field name="event_name" readOnly="true"/>
                    <a:field name="event_desc" readOnly="true"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="evt_event_handle_result_ds" autoCount="true" autoQuery="true" fetchAll="false" model="sys.EVT2010.evt_event_handle" queryUrl="${/request/@context_path}/autocrud/sys.EVT2010.evt_event_handle/query?ORDER_FIELD=order_num&amp;event_name=${/parameter/@event_name}" selectable="true">
                <!--pageSize="2" -->
                <a:fields>
                    <a:field name="order_num" required="true"/>
                    <a:field name="handle_title" required="true"/>
                    <a:field name="handle_desc" required="true"/>
                    <a:field name="proc_name" required="true"/>
                    <a:field name="handle_type" checkedValue="0" defaultValue="0" uncheckedValue="1"/>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="onhandleValuesUpdate"/>
                    <a:event name="submitsuccess" handler="onUpdateSuccess"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:fieldSet column="2" title="EVT_EVENT.INFO">
                <a:textField name="event_name" bindTarget="evt_event_handle_form_ds"/>
                <a:textField name="event_desc" bindTarget="evt_event_handle_form_ds"/>
            </a:fieldSet>
            <a:grid id="handle_grid" bindTarget="evt_event_handle_result_ds" height="300" navBar="true" width="535">
                <a:toolBar>
                    <a:button type="add"/>
                    <a:button type="delete"/>
                    <a:button type="save"/>
                </a:toolBar>
                <a:columns>
                    <a:column name="order_num" align="left" editor="evt_event_handle_result_nf" sortable="true"/>
                    <a:column name="handle_title" align="left" editor="evt_event_handle_result_tf" sortable="true"/>
                    <a:column name="handle_desc" align="left" editor="evt_event_handle_result_tf" sortable="true"/>
                    <a:column name="proc_name" align="left" editor="evt_event_handle_result_tf"/>
                    <a:column name="handle_type" editor="evt_event_handle_result_cb"/>
                </a:columns>
                <a:editors>
                    <a:textField id="evt_event_handle_result_tf"/>
                    <a:numberField id="evt_event_handle_result_nf"/>
                    <a:checkBox id="evt_event_handle_result_cb"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>