sys_prompt.lview 5.05 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: niujiaqing1265 $
    $Date: 2010/09/08 08:48:05 $
    $Revision: 1.1 $
    $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 queryPrompt(){
                $('sys_prompt_result_ds').query();
            }
            function resetPrompt(){
            	$('sys_prompt_query_ds').reset();
            }

            function promptCodeEditFunction(record,name){
                if (record.get('prompt_id')){
                    return '';
                }else{
                    return 'sys_prompt_result_grid_upper_tf';
                }
            }
            
            function languageEditFunction(record,name){
                if (record.get('prompt_id')){
                    return '';
                }else{
                    return 'sys_prompt_result_grid_comboBox';
                }
            }
                    	function sys_1004_grid_add(){
                $('sys_1004_grid').showEditorByRecord($('sys_prompt_result_ds').create());
            }
            function sys_1004_grid_clear(){
                $('sys_1004_grid').clear();
            }
            function sys_1004_grid_remove(){
                $('sys_1004_grid').remove();
            }
            function sys_1004_grid_submit() {
                var result_ds = $('sys_prompt_result_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
            function sys_1004_next(){
                 history.go(1);
            }
            function sys_1004_back(){
                history.go(-1);
            }
            function sys_1004_quit(){
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }
        
        ]]></script>
        <a:dataSets>
            <a:dataSet id="sys_prompt_languagesComboBox_ds" loadData="true" lookupCode="SYS_PROMPT_LANGUAGES"><![CDATA[
            ]]></a:dataSet>
            <a:dataSet id="sys_prompt_query_ds" model="sys.SYS1004.sys_prompts"/>
            <a:dataSet id="sys_prompt_result_ds" autoCount="true" autoQuery="true" fetchAll="false" model="sys.SYS1004.sys_prompts" pageSize="15" queryDataSet="sys_prompt_query_ds" selectable="true">
                <a:fields>
                    <a:field name="prompt_code" prompt="SYS_PROMPT.PROMPT_CODE" required="true"/>
                    <a:field name="language_display" displayField="code_value_name" options="sys_prompt_languagesComboBox_ds" required="true" returnField="language" valueField="code_value"/>
                    <a:field name="description" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="sys_1004_back" text="HLS.BACK"/>
                <a:gridButton click="sys_1004_next" text="HLS.FORWARD"/>
                <a:gridButton click="sys_1004_quit" text="HLS.EXIT"/>
                <a:gridButton click="sys_1004_grid_add" text="HLS.NEW"/>
                <a:gridButton click="sys_1004_grid_remove" text="HLS.REMOVE"/>
                <a:gridButton click="sys_1004_grid_clear" text="HLS.CLEAR"/>
                <a:gridButton click="sys_1004_grid_submit" text="HLS.SAVE"/>
                <a:gridButton click="queryPrompt" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:form column="2" title="HAP_QUERY_TITLE">
                <a:textField name="prompt_code" bindTarget="sys_prompt_query_ds" typeCase="upper" width="200">
                    <a:events>
                        <a:event name="enterdown" handler="queryPrompt"/>
                    </a:events>
                </a:textField>
                <a:textField name="description" bindTarget="sys_prompt_query_ds" width="200">
                    <a:events>
                        <a:event name="enterdown" handler="queryPrompt"/>
                    </a:events>
                </a:textField>
            </a:form>
            <a:grid id="sys_1004_grid" bindTarget="sys_prompt_result_ds" marginHeight="180" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="prompt_code" editorFunction="promptCodeEditFunction" sortable="true" width="350"/>
                    <a:column name="language_display" editorFunction="languageEditFunction" width="100"/>
                    <a:column name="description" editor="sys_prompt_result_grid_tf" width="300"/>
                </a:columns>
                <a:editors>
                    <a:textField id="sys_prompt_result_grid_tf"/>
                    <a:textField id="sys_prompt_result_grid_upper_tf" typeCase="upper"/>
                    <a:comboBox id="sys_prompt_result_grid_comboBox"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>