hls_division.lview 3.7 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhenwei.yin  
    $Date: 2012-12-11 下午4:03:43  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
            function hls_103_queryDivision() {
                $('hls_division_result_ds').query();
            }
            
            function hls_103_resetDivision() {
                $('hls_division_query_ds').reset();
            }
            
            function hls_103_grid_submit() {
                var result_ds = $('hls_division_result_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
            
            function hls_103_grid_add() {
                $('hls_division_grid').showEditorByRecord($('hls_division_result_ds').create());
            }
            
            function hls_103_next() {
                history.go(1);
            }
            
            function hls_103_back() {
                history.go(-1);
            }
            
            function hls_103_quit() {
                location.href = $('sys_service_welcome_link').getUrl();
            }
            
            function hls_103_grid_clear() {
                $('hls_division_grid').clear();
            }
            
            function hls103divisionCodeFunction(record, name) {
                if (record.isNew) {
                    return 'hls103_division_code_tf';
                } else {
                    return '';
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="hls_division_result_ds" autoQuery="true" fetchAll="false" model="hls.HLS103.hls_division" selectable="true">
                <a:fields>
                    <a:field name="division" required="true"/>
                    <a:field name="description" required="true"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hls_103_back" text="HLS.BACK"/>
                <a:gridButton click="hls_103_next" text="HLS.FORWARD"/>
                <a:gridButton click="hls_103_quit" text="HLS.EXIT"/>
                <a:gridButton click="hls_103_grid_add" text="HLS.NEW"/>
                <a:gridButton click="hls_103_grid_clear" text="HLS.CLEAR"/>
                <a:gridButton click="hls_103_grid_submit" text="HLS.SAVE"/>
                <a:gridButton click="hls_103_queryDivision" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:grid id="hls_division_grid" bindTarget="hls_division_result_ds" marginHeight="100" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="division" align="left" editorFunction="hls103divisionCodeFunction" sortable="true" width="250"/>
                    <a:column name="description" align="left" editor="hls103_division_description_tf" width="300"/>
                    <a:column name="enabled_flag" align="center" editor="hls103_division_result_grid_cb" width="100"/>
                </a:columns>
                <a:editors>
                    <a:textField id="hls103_division_code_tf" maxLength="2"/>
                    <a:textField id="hls103_division_description_tf"/>
                    <a:checkBox id="hls103_division_result_grid_cb"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>