<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-6-18 下午7:01:57  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select s.sequence,
		           v.column_name,
		           v.prompt,
		           v.input_mode,
		           v.input_mode_desc,
		           v.rowspan,
		           v.colspan
			  from fnd_common_sequence s,
			       (SELECT t.prompt,
					       t.column_name,
					       l.order_seq,
					       l.input_mode,
					       l.rowspan,
					       l.colspan,
					       (select v.code_value_name
					          from sys_code_values_v v
					         where v.code = 'HLS050_INPUT_MODE'
					           and v.code_value = l.input_mode) as input_mode_desc
					  FROM hls_doc_layout_screen l, hls_doc_layout_config t
					 where l.layout_code = ${@layout_code}
					   AND l.tab_code = ${@tab_code}
					   AND t.layout_code = l.layout_code
					   and l.column_name = t.column_name
					   and t.tab_code = l.tab_code) v
			 where s.sequence <= ${/model/screen_config_record/record/@total_count}
			   and s.sequence = v.order_seq(+)
			 order by s.sequence
 			]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
