1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?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>