gld_accounts_tree_lov.lview 1.56 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2014-02-19 下午03:38:41  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="basic.gld_accounts_v_lov" rootPath="account_list"/>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
            function onDblclick_accountLovDs_tree(tree, record, row, name) {
                var commit_summary_flag = '${/parameter/@commit_summary_flag}';
            	if(Ext.isEmpty(commit_summary_flag))
            	{
            	    $('${/parameter/@lovid}').commit(record);
            	}
            	else
            	{
            	    if(record.get('summary_flag') == commit_summary_flag){
                		$('${/parameter/@lovid}').commit(record);
                	}
            	}
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="accountLovDs">
                <a:datas dataSource="/model/account_list"/>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:tree id="accountLovDs_tree" bindTarget="accountLovDs" displayField="account_code_desc" height="570" idField="account_id" parentField="parent_account_id" sequenceField="account_code_desc" showCheckBox="false" width="530">
                <a:events>
                    <a:event name="dblclick" handler="onDblclick_accountLovDs_tree"/>
                </a:events>
            </a:tree>
        </a:screenBody>
    </a:view>
</a:screen>