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
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-7-3 上午10:07:26
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag='Y' and t1.display_flag='Y'" fetchAll="true" model="layout.server_doc_layout_config_field" rootPath="tree_lov_screen_layout_config_path"/>
<s:server-script><![CDATA[
var lov_cascade_para1 = $ctx.get('/model/tree_lov_screen_layout_config_path/record/@lov_cascade_para1'),
lov_cascade_para2 = $ctx.get('/model/tree_lov_screen_layout_config_path/record/@lov_cascade_para2'),
lov_cascade_para3 = $ctx.get('/model/tree_lov_screen_layout_config_path/record/@lov_cascade_para3');
if (lov_cascade_para1) {
$ctx.parameter.lov_cascade_para1_value = $ctx.parameter[lov_cascade_para1];
}
if (lov_cascade_para2) {
$ctx.parameter.lov_cascade_para2_value = $ctx.parameter[lov_cascade_para2];
}
if (lov_cascade_para3) {
$ctx.parameter.lov_cascade_para3_value = $ctx.parameter[lov_cascade_para3];
}
]]></s:server-script>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
function con_lovurl_validation_dblclick(tree, record, node) {
var tree_record = $('con_contract_update_lov_tree_ds').find('parent_tree_node_id', record.get('tree_node_id'));
if (tree_record) {
return;
} else {
$('${/parameter/@lovid}').commit(record);
}
}
function set_tree_ds_qpa(name, value, qpara) {
if (name) {
qpara[name] = value;
}
}
function on_con_contract_update_lov_tree_ds_query(ds, qpara) {
var lov_cascade_para1 = '${/model/tree_lov_screen_layout_config_path/record/@lov_cascade_para1}',
lov_cascade_para2 = '${/model/tree_lov_screen_layout_config_path/record/@lov_cascade_para2}',
lov_cascade_para3 = '${/model/tree_lov_screen_layout_config_path/record/@lov_cascade_para3}';
var lov_cascade_para1_value = '${/parameter/@lov_cascade_para1_value}',
lov_cascade_para2_value = '${/parameter/@lov_cascade_para2_value}',
lov_cascade_para3_value = '${/parameter/@lov_cascade_para3_value}';
set_tree_ds_qpa(lov_cascade_para1, lov_cascade_para1_value, qpara);
set_tree_ds_qpa(lov_cascade_para2, lov_cascade_para2_value, qpara);
set_tree_ds_qpa(lov_cascade_para3, lov_cascade_para3_value, qpara);
}
]]></script>
<a:dataSets>
<a:dataSet id="con_contract_update_lov_tree_ds" autoQuery="true" fetchAll="true" queryUrl="${/request/@context_path}/modules/layout/server_layout_lovurl_validation_query.lsc?layout_code=${/parameter/@layout_code}&tab_code=${/parameter/@tab_code}&column_name=${/parameter/@column_name}">
<a:events>
<a:event name="query" handler="on_con_contract_update_lov_tree_ds_query"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:tree bindTarget="con_contract_update_lov_tree_ds" displayField="tree_node_desc" expandField="expand_flag" idField="tree_node_id" parentField="parent_tree_node_id" sequenceField="order_seq">
<a:events>
<a:event name="dblclick" handler="con_lovurl_validation_dblclick"/>
</a:events>
</a:tree>
</a:screenBody>
</a:view>
</a:screen>