hls_doc_layout_screen.lview 8.2 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: DJ  
    $Date: 2013-2-26 下午2:37:49  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:c="leaf.application.action" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="hls.HLS030.hls_doc_layout_tab_for_tab_config" rootpath="screen_config_record"/>
        <a:model-query fetchAll="true" model="hls.HLS030.hls_doc_layout_sequence" rootpath="total_list"/>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
    	
        ]]></script>
        <a:freeMarker><![CDATA[
    		<script type="text/javascript">
    			
    			function ${model.getObject('/model/screen_config_record/record/@tab_code')}_screen_save()
        		{
        		    var dsName='${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs';
        		    tab_save(dsName);
        		}
        		
        		function onAdd_${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs(ds,record,index)
        		{
        		    onAdd_screenDs(ds,record,index);
        		}
        		
        		function onUpdate_${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs(ds,record,name,value,oldValue)
        		{
        		    onUpdate_screenDs(ds,record,name,value,oldValue);
        		}
        		function onFocus_${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs_form_lov(el)
        		{
        		    onFocus_screenDs_form_lov(el.record,el.binder.name);
        		}
        		function onLovClick_${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs_form_lov(el)
        		{
        		    onLovClick_screenDs_form_lov(el.record,el.binder.name);
        		}
        		
        	</script>
    	]]></a:freeMarker>
        <a:dataSets>
            <a:freeMarker><![CDATA[
        		<a:dataSet id="${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs" autoCreate="true">
	        		<a:fields>
	        			<a:field name="column_count" defaultValue="${model.getObject('/model/screen_config_record/record/@column_count')}"/>
	        			<a:field name="row_count" defaultValue="${model.getObject('/model/screen_config_record/record/@row_count')}"/>
	        			<a:field name="total_count" defaultValue="${model.getObject('/model/screen_config_record/record/@total_count')}"/>
	        			<a:field name="tab_code" defaultValue="${model.getObject('/model/screen_config_record/record/@tab_code')}"/>
	        			<a:field name="layout_code" defaultValue="${model.getObject('/model/screen_config_record/record/@layout_code')}"/>
	        			<a:field name="form_column_count" defaultValue="${model.getObject('/model/screen_config_record/record/@form_column_count')}"/>
	        			<a:field name="ds_name" defaultValue="${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs"/>
	                    <#if model.getObject("/model/total_list").getChilds()??>
	                    	<#list model.getObject("/model/total_list").getChilds() as item>
		                    	<a:field name="column_${item.getString('sequence')}" defaultValue="${item.getString('column_name')!""}" autoComplete="true" lovService="hls.HLS030.hls_doc_layout_config_lov?layout_code=${model.getObject('/model/screen_config_record/record/@layout_code')}" lovWidth="800" lovHeight="450" lovGridHeight="300" title="HLS030.HLS_FIN_CALC_CONFIG_TEMPLT.COLUMN_NAME">
		                    		<a:mapping>
			                			<a:map from="prompt" to="column_${item.getString('sequence')}_desc" />
			                			<a:map from="input_mode" to="column_${item.getString('sequence')}_input_mode" />
			                			<a:map from="input_mode_desc" to="column_${item.getString('sequence')}_input_mode_desc" />
			                			<a:map from="column_name" to="column_${item.getString('sequence')}" />
			                		</a:mapping>
			                	</a:field>
			                	<a:field name="column_${item.getString('sequence')}_desc" defaultValue="${item.getString('prompt')!""}"/>
			                	<a:field name="column_${item.getString('sequence')}_input_mode_desc" defaultValue="${item.getString('input_mode_desc')!""}"/>
			                	<a:field name="column_${item.getString('sequence')}_input_mode" defaultValue="${item.getString('input_mode')!""}"/>
		                	</#list>
		                </#if>
	                </a:fields>
	                <a:events>
        				<a:event name="add" handler="onAdd_${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs" />
        				<a:event name="update" handler="onUpdate_${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs" />
        			</a:events>
	            </a:dataSet>
        	]]></a:freeMarker>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="${/model/screen_config_record/record/@tab_code}_screen_save" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:freeMarker><![CDATA[
            	<#if model.getObject("/model/total_list").getChilds()??>
            		<#if model.getObject("/model/screen_config_record/record/@show_box")=='Y'>
            			<a:form title=" "  labelSeparator=" ">
	            			<a:box column="${model.getObject('/model/screen_config_record/record/@form_column_count')!""}"  width="${model.getObject('/model/screen_config_record/record/@box_width')!""}">
	            				<#list model.getObject("/model/total_list").getChilds() as item>
			                		<a:label name="column_${item.getString('sequence')}_desc" bindTarget="${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs" style="text-align:right;margin-top:${model.getObject('/model/screen_config_record/record/@margin_top')!""}px;" width="${model.getObject('/model/screen_config_record/record/@label_width')!""}"/>
			                		<a:lov name="column_${item.getString('sequence')}" bindTarget="${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs" style="margin-top:${model.getObject('/model/screen_config_record/record/@margin_top')!""}px;" width="${model.getObject('/model/screen_config_record/record/@field_width')!""}">
			                			<a:events>
					                		<a:event name="focus" handler="onFocus_${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs_form_lov" />
					                		<a:event name="beforetriggerclick" handler="onLovClick_${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs_form_lov" />
					                	</a:events>
			                		</a:lov>
			            		</#list>
	            			</a:box>
            			</a:form>
	            	<#else>
	        			<a:form column="${model.getObject('/model/screen_config_record/record/@form_column_count')}" title=" "  labelSeparator=" ">
		        			<#list model.getObject("/model/total_list").getChilds() as item>
		                		<a:label name="column_${item.getString('sequence')}_desc" bindTarget="${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs" style="text-align:right;margin-top:${model.getObject('/model/screen_config_record/record/@margin_top')!""}px;" width="${model.getObject('/model/screen_config_record/record/@label_width')!""}"/>
		                		<a:lov name="column_${item.getString('sequence')}" bindTarget="${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs" style="margin-top:${model.getObject('/model/screen_config_record/record/@margin_top')!""}px;" width="${model.getObject('/model/screen_config_record/record/@field_width')!""}">
		                			<a:events>
				                		<a:event name="focus" handler="onFocus_${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs_form_lov" />
				                		<a:event name="beforetriggerclick" handler="onLovClick_${model.getObject('/model/screen_config_record/record/@tab_code')}_screenDs_form_lov" />
				                	</a:events>
		                		</a:lov>
		            		</#list>
	            		</a:form>
            		</#if>
                </#if>
        	]]></a:freeMarker>
        </a:screenBody>
    </a:view>
    <a:view-config><![CDATA[
    ]]></a:view-config>
</a:screen>