<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-4-10 下午01:22:30  
    $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="hls_bp_master_dynamic_update_link_id" url="${/request/@context_path}/modules/hls/HLS213/hls_bp_master_dynamic_update.lview"/>
        <a:link id="hls_bp_master_get_layout_code_link_id" model="hls.HLS213.hls_bp_master_get_layout_code" modelaction="update"/>
        <script type="text/javascript"><![CDATA[
            function hls_hls213_create() {
                if (!$('hls_bp_master_define_head_ds').validate()) {
                    return;
                }
                var head_record = $('hls_bp_master_define_head_ds').getAt(0);
                head_record.set('function_code','HLS216');
                head_record.set('default_value_dsid','hls_bp_master_define_head_ds');
                head_record.set('function_usage', 'CREATE');
                head_record.set('master_type', 'MORTGAGE');
                head_record.data['url_title']='${l:HLS216.WIN_TITLE.MORTGAGE_CREATE}';
                var param = head_record.data;
                hls_doc_get_layout_code('hls_bp_master_get_layout_code_link_id',param,'hls_bp_master_dynamic_update_link_id');
            }
            
            function onUpdate_hls_bp_master_define_head_ds(ds, record, name, value, old_value) {
                if (name == 'mortgage_type') {
                    record.set('mortgage_ast_classfication_n','');
                    record.set('mortgage_ast_classfication','');
                    record.getField('mortgage_ast_classfication_n').setLovPara('mortgage_type',value);
                }
                else if(name=='mortgage_ast_classfication')
                {
                    record.set('mortgage_asset_detail_n','');
                    record.set('mortgage_asset_detail','');
                    record.getField('mortgage_asset_detail_n').setLovPara('mortgage_ast_classfication',value);
                    
                }
            }
        ]]></script>
        <a:screen-include screen="modules/hls/HLS213/hls_bp_master_get_layout_code.lview"/>
        <a:dataSets>
            <a:dataSet id="mortgateTypeDs" lookupCode="HLS209_MORTGAGE_TYPE"/>
            <a:dataSet id="hls_bp_master_define_head_ds" autoCreate="true">
                <a:fields>
                    <a:field name="mortgage_type"/>
                    <a:field name="mortgage_type_n" displayField="code_value_name" options="mortgateTypeDs" prompt="HLS216.HLS_MORTGAGE.MORTGAGE_TYPE" required="true" returnField="mortgage_type" valueField="code_value"/>
                    <a:field name="mortgage_ast_classfication"/>
                    <a:field name="mortgage_ast_classfication_n" lovGridHeight="300" lovHeight="500" lovService="hls.HLS216.hls_mortgage_ast_classfication_lov" lovWidth="500" prompt="HLS216.HLS_MORTGAGE.MORTGAGE_AST_CLASSFICATION" required="true" title="HLS216.HLS_MORTGAGE.MORTGAGE_AST_CLASSFICATION">
                        <a:mapping>
                            <a:map from="code_value" to="mortgage_ast_classfication"/>
                            <a:map from="code_value_name" to="mortgage_ast_classfication_n"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="mortgage_asset_detail"/>
                    <a:field name="mortgage_asset_detail_n" lovGridHeight="300" lovHeight="500" lovService="hls.HLS216.hls_mortgage_asset_detail_lov" lovWidth="500" prompt="HLS216.HLS_MORTGAGE.MORTGAGE_ASSET_DETAIL" required="true" title="HLS216.HLS_MORTGAGE.MORTGAGE_ASSET_DETAIL">
                        <a:mapping>
                            <a:map from="code_value" to="mortgage_asset_detail"/>
                            <a:map from="code_value_name" to="mortgage_asset_detail_n"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="onUpdate_hls_bp_master_define_head_ds"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:form labelWidth="120" title="HLS216.WIN_TITLE.MORTGAGE_CREATE" width="400">
                <a:comboBox name="mortgage_type_n" bindTarget="hls_bp_master_define_head_ds"/>
                <a:lov name="mortgage_ast_classfication_n" bindTarget="hls_bp_master_define_head_ds"/>
                <a:lov name="mortgage_asset_detail_n" bindTarget="hls_bp_master_define_head_ds"/>
            </a:form>
            <a:screenTopToolbar>
                <a:gridButton id="hls_hls213_create_id" click="hls_hls213_create" text="HLS.CREATE"/>
            </a:screenTopToolbar>
        </a:screenBody>
    </a:view>
</a:screen>
