<?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.tab_group=${/parameter/@tab_group} and nvl(t1.parent_tab_code,&apos;-999&apos;)=nvl(${/parameter/@parent_tab_code},&apos;-999&apos;) and t1.tab_type=&apos;TAB&apos; and t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="prj.PRJ500.prj_hls_doc_layout_tab_query" rootPath="tabpanel_layout_type_path"/>
        <s:server-script import="prj_project_create_tabpannel.js"/>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
        	function prj500_tabpanel_tab_beforeselect(tabpanel,index,tab){
        	    var id = tab.strip.id,
        	    	parent_loaded_object = id.split('##')[1];
    	    	if(parent_loaded_object){
	        	    var	parent_tabpanel = $L.CmpManager.get(parent_loaded_object);
	        	    if(parent_tabpanel){
		        	    var parent_tab = parent_tabpanel.getTab(index);
		    	    	if(!parent_tab.body.loaded){
		    	    	    parent_tabpanel.selectTab(index);
		    	    	    parent_tabpanel.on('select',function(){
		    	    	        tabpanel.selectTab(index);
		    	    	    });
		    	    	    return false;
		    	    	}
	        	    }
    	    	}
        	}
		]]></script>
        <a:tabPanel id="${/parameter/@bp_seq}${/model/tabpanel_layout_type_path/record/@tab_code}" height="${/model/tabpanel_layout_type_path/record/@height}" marginHeight="${/model/tabpanel_layout_type_path/record/@margin_height}" marginWidth="${/model/tabpanel_layout_type_path/record/@margin_width}" width="${/model/tabpanel_layout_type_path/record/@width}">
            <a:tabs><![CDATA[
            ]]></a:tabs>
            <a:events>
                <a:event name="beforeselect" handler="prj500_tabpanel_tab_beforeselect"/>
            </a:events>
        </a:tabPanel>
    </a:view>
</a:screen>