<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <model-query fetchAll="true" model="sys.SYS1090.sys_business_flexfields_lov" rootpath="columns"/>
    </a:init-procedure>
    <a:view package="leaf.ui.std" template="default">
        <style><![CDATA[
        .lovForm .layout-th {
            font-size:11px;
        }
        ]]></style>
        <div/>
        <script language="JavaScript"><![CDATA[
            function selectFlexfieldColumn(){
                var record = $('sys_bo_flexfield_columns').getCurrentRecord();
                if(record){
                    $('${/parameter/@lovid}').commit(record);
                }else {
                    closeFlexfieldWindow();
                }
            }
            function closeFlexfieldWindow(){
                var lov = $('${/parameter/@lovid}');
                if(lov.win) lov.win.close();
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="sys_bo_flexfield_columns" selectable="true" selectionModel="single">
                <a:datas dataSource="/model/columns"/>
            </a:dataSet>
        </a:dataSets>
        <a:grid bindTarget="sys_bo_flexfield_columns" height="330" style="margin-left:10px;margin-top:10px;" width="350">
            <a:columns>
                <a:column name="column_name" prompt="字段名" width="200"/>
                <a:column name="data_type" prompt="字段类型" width="100"/>
            </a:columns>
        </a:grid>
        <a:windowToolbar>
            <a:button click="selectFlexfieldColumn" text="HAP_OK" width="60"/>
            <a:button click="closeFlexfieldWindow" text="HAP_CANCEL" width="60"/>
        </a:windowToolbar>
    </a:view>
</a:screen>