aut_authority_group.lview 5.37 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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-3-19 下午02:15:46  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <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_aut005_query() {
                $('aut_authority_groups_ds').query();
            }
            
            function hls_aut005_reset() {
                $('aut_authority_groups_query_ds').reset();
            }
            
            function hls_aut005_next() {
                history.go(1);
            }
            
            function hls_aut005_back() {
                history.go(-1);
            }
            
            function hls_aut005_quit() {
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }
            
            function hls_aut005_add() {
                $('aut_authority_groups_grid').showEditorByRecord($('aut_authority_groups_ds').create());
            }
            
            function hls_aut005_submit() {
                var result_ds = $('aut_authority_groups_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
            
            function do_authority_usage_desc(record, name) {
                if (record.isNew) {
                    return 'au_gp_cb';
                }
                return '';
            }
            
            function do_authority_group(record, name) {
                if (record.isNew) {
                    return 'au_gp_tf';
                }
                return '';
            }
            
            function hls_aut005_clear() {
                $('aut_authority_groups_grid').clear();
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="authority_usage_ds" lookupCode="AUT_AUTHORITY_USAGE"/>
            <a:dataSet id="aut_authority_groups_query_ds" autoCreate="true" model="aut.AUT005.aut_authority_group">
                <a:fields>
                    <a:field name="authority_group"/>
                    <a:field name="description"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="aut_authority_groups_ds" autoQuery="true" model="aut.AUT005.aut_authority_group" queryDataSet="aut_authority_groups_query_ds" selectable="true">
                <a:fields>
                    <a:field name="authority_usage_desc" displayField="code_value_name" options="authority_usage_ds" required="true" returnField="authority_usage" valueField="code_value"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="authority_group" required="true"/>
                    <a:field name="description" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hls_aut005_back" text="HLS.BACK"/>
                <a:gridButton click="hls_aut005_next" text="HLS.FORWARD"/>
                <a:gridButton click="hls_aut005_quit" text="HLS.EXIT"/>
                <a:gridButton click="hls_aut005_query" text="HLS.QUERY"/>
                <a:gridButton click="hls_aut005_reset" text="HLS.RESET"/>
                <a:gridButton click="hls_aut005_add" text="HLS.NEW"/>
                <a:gridButton click="hls_aut005_clear" text="HLS.CLEAR"/>
                <a:gridButton click="hls_aut005_submit" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:form column="2" title="AUT_AUTHORITY_GROUP.DEFINE" width="775">
                <a:textField name="authority_group" bindTarget="aut_authority_groups_query_ds" prompt="AUT_AUTHORITY_GROUP.AUTHORITY_GROUP">
                    <a:events>
                        <a:event name="enterdown" handler="hls_aut005_query"/>
                    </a:events>
                </a:textField>
                <a:textField name="description" bindTarget="aut_authority_groups_query_ds" prompt="AUT_AUTHORITY_GROUP.DESCRIPTION">
                    <a:events>
                        <a:event name="enterdown" handler="hls_aut005_query"/>
                    </a:events>
                </a:textField>
            </a:form>
            <a:grid id="aut_authority_groups_grid" bindTarget="aut_authority_groups_ds" marginHeight="170" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="authority_usage_desc" align="center" editorFunction="do_authority_usage_desc" width="200"/>
                    <a:column name="authority_group" align="center" editorFunction="do_authority_group" sortable="true" width="200"/>
                    <a:column name="description" align="center" editor="au_gp_tf" sortable="true" width="300"/>
                    <a:column name="enabled_flag" align="center" editor="au_gp_ck" sortable="true" width="50"/>
                </a:columns>
                <a:editors>
                    <a:comboBox id="au_gp_cb"/>
                    <a:textField id="au_gp_tf"/>
                    <a:checkBox id="au_gp_ck"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>