<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-6-24 下午07:14:16  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:c="leaf.application.action" xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" customizationEnabled="true" trace="true">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="hls.HLS030.hls_doc_layout_config_grid_field" rootPath="layout_config_nodisplay_path"/>
        <a:model-query defaultWhereClause="t1.enabled_flag(+)=&apos;Y&apos; and t1.display_flag(+)=&apos;Y&apos;" fetchAll="true" model="hls.HLS030.hls_doc_layout_config_field" rootPath="layout_config_path"/>
        <a:model-query defaultWhereClause="t1.tab_code=${/parameter/@form_tab_code} and t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="cont.CON500.con_hls_doc_layout_tab_query" rootPath="tab_layout_detail_path"/>
        <a:model-query defaultWhereClause="t1.tab_code=${/parameter/@form_tab_code} and t1.enabled_flag=&apos;Y&apos; and t1.display_flag=&apos;Y&apos;" fetchAll="true" model="hls.HLS030.hls_doc_layout_doc_tab_button" rootPath="layout_form_button_path"/>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
            function on_con_header_form_submitfailed(ds) {
                unlock_current_window();
            }
            window['${/parameter/@form_tab_code}_on_con_header_form_init'] = function(ds) {
                var head_record = ds.getCurrentRecord() || ds.create();
                var config_records = $('${/parameter/@form_tab_code}_con_layout_config_ds').getAll();
                if (!'${/parameter/@master_id}' && '${/parameter/@default_value_dsid}') {
                    var default_value_ds = $('${/parameter/@default_value_dsid}'),
                        default_record = default_value_ds.getCurrentRecord();
                    for (var name in head_record.data) {
                        if (!Ext.isEmpty(default_record.get(name))) {
                            head_record.set(name, default_record.get(name));
                        }
                    }
                }
                for (var i = 0;i < config_records.length;i++) {
                    var config_record = config_records[i],
                        validation_type = config_record.get('validation_type'),
                        column_name = config_record.get('column_name'),
                        display_name = column_name + '_n';
                    if (validation_type == 'LOV' || validation_type == 'LOV_C' || validation_type == 'TREE' || validation_type == 'TREE_C') {
                        // if (validation_type == 'LOV') {
                            // head_record.getField(column_name + '_n').setLovPara('validation_sql', config_record.get('validation_sql'));
                        // } else if (validation_type == 'LOV_C') {
                            // head_record.getField(column_name).setLovPara('validation_sql', config_record.get('validation_sql'));
                        // }
                        var documentMapping;
                        if (config_record.get('lov_return_vcode') == 'Y') {
                            documentMapping = [{
                                from: 'value_code',
                                to: column_name
                            }, {
                                from: 'value_code',
                                to: column_name
                            }];
                            head_record.getField(column_name).setMapping(documentMapping);
                        } else {
                            documentMapping = [{
                                from: 'value_code',
                                to: column_name
                            }, {
                                from: 'value_name',
                                to: display_name
                            }];
                            head_record.getField(display_name).setMapping(documentMapping);
                        }
                    } else if (validation_type == 'COMBOBOX' || validation_type == 'COMBOBOX_C') {
                        var combobox_ds = '${/parameter/@form_tab_code}' + '_' + column_name + '_combobox_ds';
                        var combobox_field;
                        combobox_ds = $(combobox_ds);
                        // combobox_ds.setQueryParameter('validation_sql', config_record.get('validation_sql'));
                        if (config_record.get('lov_return_vcode') == 'Y') {
                            combobox_field = head_record.getField(column_name);
                            combobox_field.setPropertity('displayfield', 'value_code');
                        } else {
                            combobox_field = head_record.getField(display_name);
                            combobox_field.setPropertity('displayfield', 'value_name');
                        }
                    }
                }
                window['${/parameter/@form_tab_code}_on_con_update_dymanic'](ds, head_record);
                unlock_current_window();
            };
            
            window['${/parameter/@form_tab_code}_con_form_processfunction'] = function(datas) {
                for (var i = 0;i < datas.length;i++) {
                    var temp = datas[i];
                    for (var name in temp.data) {
                        var temp_record = $('${/parameter/@form_tab_code}_con_layout_config_ds').find('column_name', name);
                        if (temp_record) {
                            if (temp_record.get('validation_type') == 'NUMBERFIELD') {
                                temp.data[name] = isNaN(temp.data[name]) == true ? temp.data[name] : parseFloat(parseFloat(temp.data[name]).toFixed(temp_record.get('precision')));
                            }
                        }
                    }
                }
                return datas;
            };
            window['${/parameter/@form_tab_code}_temp_processfunction'] = function(datas) {
                var ds = $('${/model/tab_layout_detail_path/record/@parent_table_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds'),
                    f = $('temp_ds').fields;
                for (var name in f) {
                    var query_name = get_config_column_name(name),
                        display_name = query_name + '_n',
                        documentMapping;
                    var config_record = $('${/parameter/@form_tab_code}_con_layout_config_ds').find('column_name', query_name);
                    if (config_record) {
                        var validation_type = config_record.get('validation_type');
                        if (validation_type == 'LOV' || validation_type == 'LOV_C' || validation_type == 'TREE' || validation_type == 'TREE_C') {
                            // f[name].setLovPara('validation_sql', config_record.get('validation_sql'));
                            f[name].setLovPara('column_name', config_record.get('column_name'));
                            f[name].setLovPara('tab_code', config_record.get('tab_code'));
                            f[name].setLovPara('layout_code', config_record.get('layout_code'));
                            if (config_record.get('lov_return_vcode') == 'Y') {
                                documentMapping = [{
                                    from: 'value_code',
                                    to: query_name
                                }, {
                                    from: 'value_code',
                                    to: query_name
                                }];
                            } else {
                                documentMapping = [{
                                    from: 'value_code',
                                    to: query_name
                                }, {
                                    from: 'value_name',
                                    to: display_name
                                }];
                            }
                            f[name].setMapping(documentMapping);
                        } else if (validation_type == 'COMBOBOX' || validation_type == 'COMBOBOX_C') {
                            var combobox_ds = '${/parameter/@form_tab_code}' + '_' + query_name + '_combobox_ds',
                                combobox_field = f[name];
                            combobox_ds = $(combobox_ds);
                            // combobox_ds.setQueryParameter('validation_sql', config_record.get('validation_sql'));
                            combobox_ds.setQueryParameter('column_name', config_record.get('column_name'));
                            combobox_ds.setQueryParameter('tab_code', config_record.get('tab_code'));
                            combobox_ds.setQueryParameter('layout_code', config_record.get('layout_code'));
                            if (config_record.get('lov_return_vcode') == 'Y') {
                                combobox_field.setPropertity('displayfield', 'value_code');
                            } else {
                                combobox_field.setPropertity('displayfield', 'value_name');
                            }
                        }
                        ds.addField(f[name].pro);
                        var record = ds.getCurrentRecord(),
                            df = f[name].pro['defaultvalue'];
                        if (record && record.isNew && !Ext.isEmpty(df)) {
                            record.set(name, df, true);
                        }
                    }
                }
                return datas;
            };
            
            function temp_add() {
                $('temp_ds').destroy();
                unlock_current_window();
            }
            
            window['${/parameter/@form_tab_code}_on_form_object_focus'] = function(object) {
                var config_ds = $('${/parameter/@form_tab_code}_con_layout_config_ds'),
                    name = get_config_column_name(object.binder.name),
                    display_name = object.binder.name,
                    record = object.record || object.binder.ds.create();
                var config_record = config_ds.find('column_name', name);
                var lov_cascade_para1 = config_record.get('lov_cascade_para1'),
                    lov_cascade_para2 = config_record.get('lov_cascade_para2'),
                    lov_cascade_para3 = config_record.get('lov_cascade_para3'),
                    field = record.getField(display_name);
                if (object instanceof $L.Lov) {
                    if (config_record.get('validation_type') == 'LOV' || config_record.get('validation_type') == 'LOV_C') {
                        field.setLovPara('column_name', name);
                        field.setLovPara('tab_code', config_record.get('tab_code'));
                        field.setLovPara('layout_code', config_record.get('layout_code'));
                    }
                    setObjectPara('LOV', '', field, lov_cascade_para1, record);
                    setObjectPara('LOV', '', field, lov_cascade_para2, record);
                    setObjectPara('LOV', '', field, lov_cascade_para3, record);
                } else if (object instanceof $L.ComboBox) {
                    var combobox_ds = object.optionDataSet;
                    combobox_ds.setQueryParameter('column_name', name);
                    combobox_ds.setQueryParameter('tab_code', config_record.get('tab_code'));
                    combobox_ds.setQueryParameter('layout_code', config_record.get('layout_code'));
                    setObjectPara('COMBOBOX', combobox_ds, field, lov_cascade_para1, record);
                    setObjectPara('COMBOBOX', combobox_ds, field, lov_cascade_para2, record);
                    setObjectPara('COMBOBOX', combobox_ds, field, lov_cascade_para3, record);
                    combobox_ds.query();
                }
            };
            window['${/parameter/@form_tab_code}_on_form_object_beforecommit'] = function(object, record, lov_record) {
                var display_name = object.binder.name,
                    field = record.getField(display_name),
                    mapping = field.get('mapping'),
                    exists_flag = false;
                for (var name in lov_record.data) {
                    exists_flag = false;
                    for (var i = 0,
                        mapping_length = mapping.length;i < mapping_length;i++) {
                        if ((exists_flag = (name == mapping[i]['from']))) {
                            break;
                        }
                    }
                    if (!exists_flag) {
                        mapping.push({
                            from: name,
                            to: name
                        });
                    }
                }
                field.setMapping(mapping);
            };
        ]]></script>
        <a:screen-include screen="modules/hls/HLS213/hls_bp_master_dynamic.lview?tab_code=${/parameter/@form_tab_code}&amp;layout_code=${/parameter/@layout_code}&amp;function_code=${/parameter/@function_code}&amp;function_usage=${/parameter/@function_usage}&amp;winid=${/parameter/@winid}&amp;master_id=${/parameter/@master_id}&amp;master_type=${/parameter/@master_type}"/>
        <a:dataSets>
            <a:placeHolder id="dynamicFormDataSet_Form_id"/>
            <a:dataSet id="${/parameter/@form_tab_code}_con_layout_config_ds">
                <a:datas dataSource="/model/layout_config_nodisplay_path"/>
            </a:dataSet>
            <a:freeMarker><![CDATA[
            	<#if model.getObject("/model/tab_layout_detail_path").getChilds()??>
            		<#if model.getObject("/model/tab_layout_detail_path/record/@parent_tab_code_flag")=='N'>
	            		<a:dataSet id="temp_ds" processFunction="${model.getObject("/parameter/@form_tab_code")!""}_temp_processfunction" >
	                		<a:fields>
	                			<#if model.getObject("/model/layout_config_nodisplay_path").getChilds()??>
		                			<#list model.getObject('/model/layout_config_nodisplay_path').getChilds() as item>
	        							<#if item.getString('validation_type') =='LOV_C'>
	        								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" autoComplete="${item.getString('autocomplete')}" fetchSingle="${item.getString('fetchsingle')}" defaultValue="${item.getString('default_value')!""}" lovGridHeight="350" lovHeight="500" lovService="cont.CON500.con_parameters_lov" lovWidth="560" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}">
	        									<a:mapping>
            										<a:map from="value_code" to="${item.getString('column_name')}"/>
            									</a:mapping>
	        								</a:field>
	                    				<#elseif item.getString('validation_type') =='LOV'>
	        								<a:field name="${item.getString('column_name')}_n" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" autoComplete="${item.getString('autocomplete')}" fetchSingle="${item.getString('fetchsingle')}" defaultValue="${item.getString('default_value_name')!""}" lovGridHeight="350" lovHeight="500" lovService="cont.CON500.con_parameters_lov" lovWidth="560" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}">
	        									<a:mapping>
            										<a:map from="value_code" to="${item.getString('column_name')}"/>
            										<a:map from="value_name" to="${item.getString('column_name')}_n"/>
            									</a:mapping>
	        								</a:field>
	                    					<a:field name="${item.getString('column_name')}"  requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}"/>
	                    				<#elseif item.getString('validation_type') =='TREE_C'>
	        								<a:field name="${item.getString('column_name')}"  requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}" lovGridHeight="350" lovHeight="500" lovUrl='${r"${/request/@context_path}"}/modules/cont/CON500/con_contract_update_lov_tree.lview?tab_code=${model.getObject("/parameter/@form_tab_code")}&amp;layout_code=${model.getObject("/parameter/@layout_code")}&amp;column_name=${item.getString("column_name")}' lovWidth="500" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}">
	        									<a:mapping>
            										<a:map from="value_code" to="${item.getString('column_name')}"/>
            									</a:mapping>
	        								</a:field>
	                    				<#elseif item.getString('validation_type') =='TREE'>
	        								<a:field name="${item.getString('column_name')}_n"  requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value_name')!""}" lovGridHeight="350" lovHeight="500" lovUrl='${r"${/request/@context_path}"}/modules/cont/CON500/con_contract_update_lov_tree.lview?tab_code=${model.getObject("/parameter/@form_tab_code")}&amp;layout_code=${model.getObject("/parameter/@layout_code")}&amp;column_name=${item.getString("column_name")}' lovWidth="500" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}">
	        									<a:mapping>
            										<a:map from="value_code" to="${item.getString('column_name')}"/>
            										<a:map from="value_name" to="${item.getString('column_name')}_n"/>
            									</a:mapping>
	        								</a:field>
	                    					<a:field name="${item.getString('column_name')}"  requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}"/>
	        							<#elseif item.getString('validation_type') =='COMBOBOX_C'>
	        								<a:field name="${item.getString('column_name')}"  requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" displayField="value_code" returnField="${item.getString('column_name')}" valueField="value_code" defaultValue="${item.getString('default_value')!""}" options="${model.getObject('/parameter/@form_tab_code')}_${item.getString('column_name')}_combobox_ds" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
	        							<#elseif item.getString('validation_type') =='COMBOBOX'>
	        								<a:field name="${item.getString('column_name')}_n" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" displayField="value_name" returnField="${item.getString('column_name')}" valueField="value_code" defaultValue="${item.getString('default_value_name')!""}" options="${model.getObject('/parameter/@form_tab_code')}_${item.getString('column_name')}_combobox_ds" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
	                    					<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}"/>
	        							<#elseif item.getString('validation_type') =='CHECKBOX'>
	        								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" checkedValue="Y" defaultValue="${item.getString('default_value')!""}" uncheckedValue="N"/>
	        							<#elseif item.getString('validation_type') =='DATEPICKER'>
		            						<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" datatype="java.util.Date" defaultValue="${item.getString('default_value')!""}" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}"/>
	        							<#elseif item.getString('validation_type') =='DIV'>
	        							<#else>
	        							    <a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}"/>
	        							</#if>
	                                  </#list>
                                </#if>
	                		</a:fields>
	                		<a:datas>
            					<a:record name="temp"/>
            				</a:datas>
	                		<a:events>
	                			<a:event name="add" handler="temp_add" />
	                		</a:events>
	                	</a:dataSet>
	                	<script type="text/javascript">
                    		$('temp_ds').create();
                       </script>
            		<#else>
	            			<#if model.getObject("/model/tab_layout_detail_path/record/@parent_table_flag")=='N'>
	            				<a:dataSet id="${model.getObject("/parameter/@form_tab_code")!""}_${model.getObject('/model/tab_layout_detail_path/record/@base_table')}_ds" fetchAll="true" processFunction="${model.getObject("/parameter/@form_tab_code")!""}_con_form_processfunction" queryUrl='${r"${/request/@context_path}"}/modules/cont/CON500/con_contract_base_query.lsc?master_id=${model.getObject("/parameter/@master_id")!""}&amp;master_type=${model.getObject("/parameter/@master_type")!""}&amp;document_category=${model.getObject("/parameter/@document_category")!""}&amp;document_id=${model.getObject("/parameter/@document_id")!""}&amp;tab_code=${model.getObject("/parameter/@form_tab_code")!""}&amp;layout_code=${model.getObject("/parameter/@layout_code")!""}' submitUrl='${r"${/request/@context_path}"}/modules/hls/HLS213/hls_bp_master_save.lsc?base_table=${model.getObject("/model/tab_layout_detail_path/record").getString("base_table")}&amp;query_only=${model.getObject("/model/tab_layout_detail_path/record/@query_only")!""}&amp;tab_code=${model.getObject("/parameter").getString("form_tab_code")}&amp;function_code=${model.getObject("/parameter").getString("function_code")}&amp;function_usage=${model.getObject("/parameter").getString("function_usage")}&amp;document_category=${model.getObject("/parameter/@document_category")!""}&amp;document_id=${model.getObject("/parameter/@document_id")!""}&amp;master_id=${model.getObject("/parameter/@master_id")!""}&amp;master_type=${model.getObject("/parameter/@master_type")!""}&amp;parent_table=${model.getObject("/model/tab_layout_detail_path/record").getString("parent_table")!""}&amp;parent_base_table_pk=${model.getObject("/model/tab_layout_detail_path/record").getString("parent_base_table_pk")!""}'>
	            					<a:fields>
		            					<#if model.getObject("/model/layout_config_nodisplay_path").getChilds()??>
		            						<#list model.getObject('/model/layout_config_nodisplay_path').getChilds() as item>
		            							<#if item.getString('validation_type') =='LOV_C'>
		            								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" autoComplete="${item.getString('autocomplete')}" fetchSingle="${item.getString('fetchsingle')}" defaultValue="${item.getString('default_value')!""}" lovGridHeight="350" lovHeight="500" lovService="cont.CON500.con_parameters_lov" lovWidth="560" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
		            							<#elseif item.getString('validation_type') =='LOV'>
		            								<a:field name="${item.getString('column_name')}_n" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" autoComplete="${item.getString('autocomplete')}" fetchSingle="${item.getString('fetchsingle')}" defaultValue="${item.getString('default_value_name')!""}" lovGridHeight="350" lovHeight="500" lovService="cont.CON500.con_parameters_lov" lovWidth="560" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
	                            					<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}"/>
		            							<#elseif item.getString('validation_type') =='TREE_C'>
		            								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}" lovGridHeight="350" lovHeight="500" lovUrl='${r"${/request/@context_path}"}/modules/cont/CON500/con_contract_update_lov_tree.lview?tab_code=${model.getObject("/parameter/@form_tab_code")}&amp;layout_code=${model.getObject("/parameter/@layout_code")}&amp;column_name=${item.getString("column_name")}' lovWidth="500" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
		            							<#elseif item.getString('validation_type') =='TREE'>
		            								<a:field name="${item.getString('column_name')}_n" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value_name')!""}" lovGridHeight="350" lovHeight="500" lovUrl='${r"${/request/@context_path}"}/modules/cont/CON500/con_contract_update_lov_tree.lview?tab_code=${model.getObject("/parameter/@form_tab_code")}&amp;layout_code=${model.getObject("/parameter/@layout_code")}&amp;column_name=${item.getString("column_name")}' lovWidth="500" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
	                            					<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}"/>
		            							<#elseif item.getString('validation_type') =='COMBOBOX_C'>
		            								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" returnField="${item.getString('column_name')}" valueField="value_code" defaultValue="${item.getString('default_value')!""}" options="${model.getObject('/parameter/@form_tab_code')}_${item.getString('column_name')}_combobox_ds" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
		            							<#elseif item.getString('validation_type') =='COMBOBOX'>
		            								<a:field name="${item.getString('column_name')}_n" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" returnField="${item.getString('column_name')}" valueField="value_code" defaultValue="${item.getString('default_value_name')!""}" options="${model.getObject('/parameter/@form_tab_code')}_${item.getString('column_name')}_combobox_ds" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
	                            					<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}"/>
		            							<#elseif item.getString('validation_type') =='CHECKBOX'>
		            								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" checkedValue="Y" defaultValue="${item.getString('default_value')!""}" uncheckedValue="N"/>
		            							<#elseif item.getString('validation_type') =='DATEPICKER'>
		            								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" datatype="java.util.Date" defaultValue="${item.getString('default_value')!""}" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}"/>
		            							<#elseif item.getString('validation_type') =='DIV'>
		            							<#else>
		            							    <a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}"/>
		            							</#if>
		                                    </#list>
		                                  </#if>
	                                </a:fields>
	                                <a:events>
	                					<a:event name="load" handler="${model.getObject("/parameter/@form_tab_code")!""}_on_con_header_form_init"/>
	                					<a:event name="add" handler="${model.getObject("/parameter/@form_tab_code")!""}_on_con_header_form_init"/>
	                					<a:event name="update" handler="${model.getObject("/parameter/@form_tab_code")!""}_on_con_doc_update"/>
	                					<a:event name="submitfailed" handler="on_con_header_form_submitfailed"/>
	                				</a:events>
                            	</a:dataSet>
                            	<script type="text/javascript">
                            	(function(){
                            	    var base_ds=$('${model.getObject("/parameter/@form_tab_code")!""}_${model.getObject('/model/tab_layout_detail_path/record/@base_table')}_ds');
                            		if(!'${model.getObject("/parameter/@master_id")!""}'){
                            			base_ds.create();
                            		}else{
                            		    base_ds.setQueryParameter('${model.getObject('/model/tab_layout_detail_path/record/@parent_base_table_pk')!""}','${model.getObject("/parameter/@master_id")!""}');
                            		    base_ds.query();
                            		    base_ds.on('load',function(){
                            		        if(!base_ds.getAll().length){
                            		            base_ds.create();
                            		        }
                            		    });
                            		}
                        		})();
                            	</script>
                            <#else>
                                 <a:dataSet id="${model.getObject("/parameter/@form_tab_code")!""}_${model.getObject('/model/tab_layout_detail_path/record/@base_table')}_ds" fetchAll="true" processFunction="${model.getObject("/parameter/@form_tab_code")!""}_con_form_processfunction" bindName="${model.getObject('/parameter/@form_tab_code')}_${model.getObject('/model/tab_layout_detail_path/record/@base_table')}" queryUrl='${r"${/request/@context_path}"}/modules/cont/CON500/con_contract_base_query.lsc?master_id=${model.getObject("/parameter/@master_id")!""}&amp;master_type=${model.getObject("/parameter/@master_type")!""}&amp;tab_code=${model.getObject("/parameter/@form_tab_code")!""}&amp;layout_code=${model.getObject("/parameter/@layout_code")!""}&amp;document_category=${model.getObject("/parameter/@document_category")!""}&amp;document_id=${model.getObject("/parameter/@document_id")!""}'  bindTarget="${model.getObject('/model/tab_layout_detail_path/record/@parent_table_tab_code')}_${model.getObject('/model/tab_layout_detail_path/record/@parent_table')}_ds" submitUrl='${r"${/request/@context_path}"}/modules/hls/HLS213/hls_bp_master_save.lsc?base_table=${model.getObject("/model/tab_layout_detail_path/record").getString("base_table")}&amp;query_only=${model.getObject("/model/tab_layout_detail_path/record/@query_only")!""}&amp;tab_code=${model.getObject("/parameter").getString("form_tab_code")}&amp;function_code=${model.getObject("/parameter").getString("function_code")}&amp;function_usage=${model.getObject("/parameter").getString("function_usage")}&amp;document_category=${model.getObject("/parameter/@document_category")!""}&amp;document_id=${model.getObject("/parameter/@document_id")!""}&amp;master_id=${model.getObject("/parameter/@master_id")!""}&amp;master_type=${model.getObject("/parameter/@master_type")!""}&amp;parent_table=${model.getObject("/model/tab_layout_detail_path/record").getString("parent_table")!""}&amp;parent_base_table_pk=${model.getObject("/model/tab_layout_detail_path/record").getString("parent_base_table_pk")!""}'>
	            					<a:fields>
	            						<#if model.getObject("/model/layout_config_nodisplay_path").getChilds()??>
		            						<#list model.getObject('/model/layout_config_nodisplay_path').getChilds() as item>
		            							<#if item.getString('validation_type') =='LOV_C'>
		            								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" autoComplete="${item.getString('autocomplete')}" fetchSingle="${item.getString('fetchsingle')}" defaultValue="${item.getString('default_value')!""}" lovGridHeight="350" lovHeight="500" lovService="cont.CON500.con_parameters_lov" lovWidth="560" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
	                            				<#elseif item.getString('validation_type') =='LOV'>
		            								<a:field name="${item.getString('column_name')}_n" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" autoComplete="${item.getString('autocomplete')}" fetchSingle="${item.getString('fetchsingle')}" defaultValue="${item.getString('default_value_name')!""}" lovGridHeight="350" lovHeight="500" lovService="cont.CON500.con_parameters_lov" lovWidth="560" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
	                            					<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}"/>
	                            				<#elseif item.getString('validation_type') =='TREE_C'>
		            								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}" lovGridHeight="350" lovHeight="500" lovUrl='${r"${/request/@context_path}"}/modules/cont/CON500/con_contract_update_lov_tree.lview?tab_code=${model.getObject("/parameter/@form_tab_code")}&amp;layout_code=${model.getObject("/parameter/@layout_code")}&amp;column_name=${item.getString("column_name")}' lovWidth="500" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
	                            				<#elseif item.getString('validation_type') =='TREE'>
		            								<a:field name="${item.getString('column_name')}_n" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value_name')!""}" lovGridHeight="350" lovHeight="500" lovUrl='${r"${/request/@context_path}"}/modules/cont/CON500/con_contract_update_lov_tree.lview?tab_code=${model.getObject("/parameter/@form_tab_code")}&amp;layout_code=${model.getObject("/parameter/@layout_code")}&amp;column_name=${item.getString("column_name")}' lovWidth="500" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
	                            					<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}"/>
		            							<#elseif item.getString('validation_type') =='COMBOBOX_C'>
		            								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" returnField="${item.getString('column_name')}" valueField="value_code" defaultValue="${item.getString('default_value')!""}" options="${model.getObject('/parameter/@form_tab_code')}_${item.getString('column_name')}_combobox_ds" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
		            							<#elseif item.getString('validation_type') =='COMBOBOX'>
		            								<a:field name="${item.getString('column_name')}_n" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" returnField="${item.getString('column_name')}" valueField="value_code" defaultValue="${item.getString('default_value_name')!""}" options="${model.getObject('/parameter/@form_tab_code')}_${item.getString('column_name')}_combobox_ds" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" title="${item.getString('prompt')!''}"/>
	                            					<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}"/>
		            							<#elseif item.getString('validation_type') =='CHECKBOX'>
		            								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}" checkedValue="Y" defaultValue="${item.getString('default_value')!""}" uncheckedValue="N"/>
		            							<#elseif item.getString('validation_type') =='DATEPICKER'>
		            								<a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" datatype="java.util.Date" defaultValue="${item.getString('default_value')!""}" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}"/>
		            							<#elseif item.getString('validation_type') =='DIV'>
		            							<#else>
		            							    <a:field name="${item.getString('column_name')}" requiredMessage="${model.getObject("/model/tab_layout_detail_path/record/@tab_desc")!""}${item.getString('prompt')!''}${buildSession.getLocalizedPrompt('HLS.NOT_NULL')}" defaultValue="${item.getString('default_value')!""}" readOnly="${item.getString('readonly_input_mode')}" required="${item.getString('required_input_mode')}"/>
		            							</#if>
		                                    </#list>
	                                    </#if>
	                                </a:fields>
	                                <a:events>
	                					<a:event name="load" handler="${model.getObject("/parameter/@form_tab_code")!""}_on_con_header_form_init"/>
	                					<a:event name="add" handler="${model.getObject("/parameter/@form_tab_code")!""}_on_con_header_form_init"/>
	                					<a:event name="update" handler="${model.getObject("/parameter/@form_tab_code")!""}_on_con_doc_update"/>
	                					<a:event name="submitfailed" handler="on_con_header_form_submitfailed"/>
	                				</a:events>
                            	</a:dataSet>
                            	<script type="text/javascript">
                            		(function(){
                            		    var base_ds=$('${model.getObject("/parameter/@form_tab_code")!""}_${model.getObject('/model/tab_layout_detail_path/record/@base_table')}_ds');
	                            		var parent_ds=$('${model.getObject('/model/tab_layout_detail_path/record/@parent_table_tab_code')}_${model.getObject('/model/tab_layout_detail_path/record/@parent_table')}_ds');
	                            		if(!'${model.getObject("/parameter/@master_id")!""}'){
	                            			base_ds.create();
	                            		}else{
	                            		    parent_ds.on('indexchange',function(ds){
		                            		    base_ds.setQueryParameter('${model.getObject('/model/tab_layout_detail_path/record/@parent_base_table_pk')!""}',parent_ds.getCurrentRecord().get('${model.getObject('/model/tab_layout_detail_path/record/@parent_base_table_pk')!""}'));
		                            		    base_ds.query();
		                            		    base_ds.on('load',function(){
		                            		       if(!base_ds.getAll().length){
		                            		      	  base_ds.create(); 
		                            		       }
		                            		    });
	                            		    });
	                            		}
                            		})();
                            	</script>
	            			</#if>
            		</#if>
            	</#if>
            ]]></a:freeMarker>
        </a:dataSets>
        <a:freeMarker><![CDATA[
	        	<#if model.getObject("/model/layout_form_button_path").getChilds()??>
        			<a:hBox style="margin-top:-8px;margin-bottom:3px;">
		        		<#list model.getObject('/model/layout_form_button_path').getChilds() as item>
			        			<#if item.getString('button_code') =='SAVE'>
			        				<a:button click="hls213_bp_master_save" text="${item.getString('prompt')!""}"/>
			        			<#elseif item.getString('button_code') =='EXIT'>
			        				<a:button click="hls213_bp_master_exit" text="${item.getString('prompt')!""}"/>
			        			</#if>
		        		</#list>
        			</a:hBox>
	        	</#if>
	        ]]></a:freeMarker>
        <a:switch test="/model/tab_layout_detail_path/record/@show_box">
            <a:case value="Y">
                <a:form marginWidth="${/model/tab_layout_detail_path/record/@margin_width}" title="${/model/tab_layout_detail_path/record/@tab_desc}" width="${/model/tab_layout_detail_path/record/@width}" wrapperAdjust="false">
                    <div style="width:${/model/tab_layout_detail_path/record/@box_width}px">
                        <a:box column="${/model/tab_layout_detail_path/record/@column_count}" labelSeparator=" " labelWidth="${/model/tab_layout_detail_path/record/@label_width}" row="${/model/tab_layout_detail_path/record/@row_count}" width="${/model/tab_layout_detail_path/record/@box_width}">
                            <a:placeHolder id="dynamicHeadFormBox_id"/>
                        </a:box>
                    </div>
                </a:form>
            </a:case>
            <a:case value="N">
                <a:form column="${/model/tab_layout_detail_path/record/@column_count}" labelSeparator=" " labelWidth="${/model/tab_layout_detail_path/record/@label_width}" marginWidth="${/model/tab_layout_detail_path/record/@margin_width}" row="${/model/tab_layout_detail_path/record/@row_count}" title="${/model/tab_layout_detail_path/record/@tab_desc}" width="${/model/tab_layout_detail_path/record/@width}" wrapperAdjust="false">
                    <a:placeHolder id="dynamicHeadForm_id"/>
                </a:form>
            </a:case>
        </a:switch>
    </a:view>
    <a:view-config>
        <c:create-config targetId="dynamicFormDataSet_Form_id">
            <p:loop source="/model/layout_config_nodisplay_path">
                <p:switch test="@validation_type">
                    <p:case value="COMBOBOX">
                        <c:process-config>
                            <a:dataSet id="${/parameter/@form_tab_code}_${@column_name}_combobox_ds" fetchAll="true" queryUrl="${/request/@context_path}/autocrud/cont.CON500.con_parameters_lov/query"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="COMBOBOX_C">
                        <c:process-config>
                            <a:dataSet id="${/parameter/@form_tab_code}_${@column_name}_combobox_ds" fetchAll="true" queryUrl="${/request/@context_path}/autocrud/cont.CON500.con_parameters_lov/query"/>
                        </c:process-config>
                    </p:case>
                </p:switch>
            </p:loop>
        </c:create-config>
        <c:create-config targetId="dynamicHeadForm_id">
            <p:loop source="/model/layout_config_path">
                <p:switch test="@validation_type">
                    <p:case value="NUMBERFIELD">
                        <c:process-config>
                            <a:numberField name="${@column_name}" allowDecimals="${@allow_decimal}" allowFormat="${@allow_format}" allowPad="${@zero_fill}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" decimalPrecision="${@precision}" prompt="${@prompt}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="PERCENTFIELD">
                        <c:process-config>
                            <a:percentField name="${@column_name}" allowDecimals="${@allow_decimal}" allowFormat="${@allow_format}" allowPad="${@zero_fill}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" decimalPrecision="${@precision}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="LOV_C">
                        <c:process-config>
                            <a:lov name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" prompt="${@prompt}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                    <a:event name="beforecommit" handler="${/parameter/@form_tab_code}_on_form_object_beforecommit"/>
                                </a:events>
                            </a:lov>
                        </c:process-config>
                    </p:case>
                    <p:case value="LOV">
                        <c:process-config>
                            <a:lov name="${@column_name}_n" id="${/parameter/@form_tab_code}_${@column_name}_lov" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" prompt="${@prompt}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                    <a:event name="beforecommit" handler="${/parameter/@form_tab_code}_on_form_object_beforecommit"/>
                                </a:events>
                            </a:lov>
                        </c:process-config>
                    </p:case>
                    <p:case value="TREE_C">
                        <c:process-config>
                            <a:lov name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" prompt="${@prompt}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                    <a:event name="beforecommit" handler="${/parameter/@form_tab_code}_on_form_object_beforecommit"/>
                                </a:events>
                            </a:lov>
                        </c:process-config>
                    </p:case>
                    <p:case value="TREE">
                        <c:process-config>
                            <a:lov name="${@column_name}_n" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" prompt="${@prompt}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                    <a:event name="beforecommit" handler="${/parameter/@form_tab_code}_on_form_object_beforecommit"/>
                                </a:events>
                            </a:lov>
                        </c:process-config>
                    </p:case>
                    <p:case value="COMBOBOX_C">
                        <c:process-config>
                            <a:comboBox name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" prompt="${@prompt}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                </a:events>
                            </a:comboBox>
                        </c:process-config>
                    </p:case>
                    <p:case value="COMBOBOX">
                        <c:process-config>
                            <a:comboBox name="${@column_name}_n" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" prompt="${@prompt}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                </a:events>
                            </a:comboBox>
                        </c:process-config>
                    </p:case>
                    <p:case value="DATEPICKER">
                        <c:process-config>
                            <a:datePicker name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" prompt="${@prompt}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="TEXTFIELD">
                        <c:process-config>
                            <a:textField name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" prompt="${@prompt}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}pxpx" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="CHECKBOX">
                        <c:process-config>
                            <a:checkBox name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" prompt="${@prompt}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="DIV">
                        <c:process-config>
                            <div prompt=" " style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                </p:switch>
            </p:loop>
        </c:create-config>
        <c:create-config targetId="dynamicHeadFormBox_id">
            <p:loop source="/model/layout_config_path">
                <p:switch test="@validation_type">
                    <p:case value="NUMBERFIELD">
                        <c:process-config>
                            <a:numberField name="${@column_name}" allowDecimals="${@allow_decimal}" allowFormat="${@allow_format}" allowPad="${@zero_fill}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" decimalPrecision="${@precision}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="PERCENTFIELD">
                        <c:process-config>
                            <a:percentField name="${@column_name}" allowDecimals="${@allow_decimal}" allowPad="${@zero_fill}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" decimalPrecision="${@precision}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="LOV_C">
                        <c:process-config>
                            <a:lov name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                    <a:event name="beforecommit" handler="${/parameter/@form_tab_code}_on_form_object_beforecommit"/>
                                </a:events>
                            </a:lov>
                        </c:process-config>
                    </p:case>
                    <p:case value="LOV">
                        <c:process-config>
                            <a:lov name="${@column_name}_n" id="${/parameter/@form_tab_code}_${@column_name}_lov" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                    <a:event name="beforecommit" handler="${/parameter/@form_tab_code}_on_form_object_beforecommit"/>
                                </a:events>
                            </a:lov>
                        </c:process-config>
                    </p:case>
                    <p:case value="TREE_C">
                        <c:process-config>
                            <a:lov name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                    <a:event name="beforecommit" handler="${/parameter/@form_tab_code}_on_form_object_beforecommit"/>
                                </a:events>
                            </a:lov>
                        </c:process-config>
                    </p:case>
                    <p:case value="TREE">
                        <c:process-config>
                            <a:lov name="${@column_name}_n" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                    <a:event name="beforecommit" handler="${/parameter/@form_tab_code}_on_form_object_beforecommit"/>
                                </a:events>
                            </a:lov>
                        </c:process-config>
                    </p:case>
                    <p:case value="COMBOBOX_C">
                        <c:process-config>
                            <a:comboBox name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                </a:events>
                            </a:comboBox>
                        </c:process-config>
                    </p:case>
                    <p:case value="COMBOBOX">
                        <c:process-config>
                            <a:comboBox name="${@column_name}_n" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}">
                                <a:events>
                                    <a:event name="focus" handler="${/parameter/@form_tab_code}_on_form_object_focus"/>
                                </a:events>
                            </a:comboBox>
                        </c:process-config>
                    </p:case>
                    <p:case value="DATEPICKER">
                        <c:process-config>
                            <a:datePicker name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="TEXTFIELD">
                        <c:process-config>
                            <a:textField name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="CHECKBOX">
                        <c:process-config>
                            <a:checkBox name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="TEXTAREA">
                        <c:process-config>
                            <a:textArea name="${@column_name}" bindTarget="${/model/tab_layout_detail_path/record/@form_binder_tab_code}_${/model/tab_layout_detail_path/record/@base_table}_ds" colspan="${@colspan}" prompt="${@prompt}" rowspan="${@rowspan}" style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                    <p:case value="DIV">
                        <c:process-config>
                            <div prompt=" " style="margin-top:${/model/tab_layout_detail_path/record/@margin_top}px;margin-bottom:${/model/tab_layout_detail_path/record/@margin_top}px" width="${@width}"/>
                        </c:process-config>
                    </p:case>
                </p:switch>
            </p:loop>
        </c:create-config>
    </a:view-config>
</a:screen>
