<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: qwm $Date: 2012-11-13 下午03:36:35 $Revision: 1.0 $Purpose: --> <a:screen xmlns:a="http://www.leaf-framework.org/application"> <a:view> <script type="text/javascript"><![CDATA[ function queryFunction() { $('head_ds').query(); } function resetFunction() { $('datasoure_query_ds').reset(); } function fieldNameEditor(record,name){ if (!record.isNew){ return ''; }else{ return 'subds_tf'; } } ]]></script> <a:dataSets> <a:dataSet id="datasoure_query_ds"> <a:fields> <a:field name="datasource_name"/> <a:field name="datasoure_type" displayField="name" options="datasoure_ds" returnField="datasoure_type" valueField="value"/> </a:fields> </a:dataSet> <a:dataSet id="datasoure_ds"> <a:datas> <a:record name="bm" value="bm"/> <a:record name="sql" value="sql"/> </a:datas> </a:dataSet> <a:dataSet id="head_ds" autoQuery="true" fetchAll="true" queryDataSet="datasoure_query_ds" queryUrl="${/request/@context_path}/autocrud/rpt.RPT1040.rpt_datasource/query" selectable="true" submitUrl="rpt_datasource_update.lsc"> <a:fields> <a:field name="datasoure_type" displayField="name" options="datasoure_ds" required="true" returnField="datasoure_type" valueField="value"/> <a:field name="datasource_id"/> <a:field name="datasource_name" required="true"/> <a:field name="datasource_content" required="true"/> </a:fields> </a:dataSet> <a:dataSet id="line_ds" autoCount="false" bindName="sub" bindTarget="head_ds" fetchAll="true" queryUrl="${/request/@context_path}/modules/rpt/RPT1040/rpt_datasource_query.lsc" selectable="true"><![CDATA[ ]]></a:dataSet> </a:dataSets> <a:screenBody> <a:form column="2" labelWidth="120" title="RPT_DATASOURCE.TITLE" width="600"> <a:comboBox name="datasoure_type" bindTarget="datasoure_query_ds" prompt="RPT_DATASOURCE.DATASOURCE_TYPE"/> <a:textField name="datasource_name" bindTarget="datasoure_query_ds" prompt="RPT_DATASOURCE.DATASOURCE_NAME"/> </a:form> <a:hBox> <a:button click="queryFunction" text="HAP_QUERY"/> <a:button click="resetFunction" text="HAP_RESET"/> </a:hBox> <a:grid bindTarget="head_ds" height="240" navBar="false" width="600"> <a:toolBar> <a:button type="add"/> <a:button type="delete"/> <a:button type="save"/> </a:toolBar> <a:columns> <a:column name="datasoure_type" editor="datasoure_cb" prompt="RPT_DATASOURCE.DATASOURCE_TYPE" width="180"/> <a:column name="datasource_name" editor="ds_tf" prompt="RPT_DATASOURCE.DATASOURCE_NAME" width="180"/> <a:column name="datasource_content" editor="datasoure_ta" prompt="RPT_DATASOURCE.DATASOURCE_CONTENT" width="180"/> </a:columns> <a:editors> <a:textField id="ds_tf"/> <a:comboBox id="datasoure_cb"/> <a:textArea id="datasoure_ta"/> </a:editors> </a:grid> <a:grid bindTarget="line_ds" height="240" navBar="fasle" width="600"> <a:toolBar> <a:button type="add"/> <a:button type="delete"/> </a:toolBar> <a:columns> <a:column name="name" editor="subds_tf" editorFunction="fieldNameEditor" prompt="RPT_DATASOURCE_FIELD.FIELD_NAME" width="180"/> <a:column name="prompt" editor="subds_tf" prompt="RPT_DATASOURCE_FIELD.FIELD_TITLE" width="180"/> <a:column name="databasetype" editor="subds_tf" prompt="RPT_DATASOURCE_FIELD.FIELD_TYPE" width="180"/> </a:columns> <a:editors> <a:textField id="subds_tf"/> </a:editors> </a:grid> </a:screenBody> </a:view> </a:screen>