1
|
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
|
2
|
<%@ taglib uri="/tags/struts-html" prefix="html" %>
|
3
|
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
|
4
|
|
5
|
<logic:present name="GEOSERVER.USER" property="dataStoreConfig" scope="session">
|
6
|
|
7
|
<html:form action="/config/data/storeSubmit" onsubmit="return checkspaces(this)">
|
8
|
<table class="info">
|
9
|
<tr>
|
10
|
<td class="label">
|
11
|
<span class="help" title="<bean:message key="help.dataStore_id"/>">
|
12
|
<bean:message key="label.dataStoreID"/>:
|
13
|
</span>
|
14
|
</td>
|
15
|
<td class="datum">
|
16
|
<bean:write name="dataDataStoresEditorForm" property="dataStoreId"/>
|
17
|
</td>
|
18
|
</tr>
|
19
|
<tr>
|
20
|
<td class="label">
|
21
|
<span class="help" title="<bean:message key="help.dataStore_enabled"/>">
|
22
|
<bean:message key="label.enabled"/>:
|
23
|
</span>
|
24
|
</td>
|
25
|
<td class="datum">
|
26
|
<html:checkbox property="enabled"/>
|
27
|
</td>
|
28
|
</tr>
|
29
|
<tr>
|
30
|
<td class="label">
|
31
|
<span class="help" title="<bean:message key="help.dataStore_nameSpace"/>">
|
32
|
<bean:message key="label.namespace"/>:
|
33
|
</span>
|
34
|
</td>
|
35
|
<td class="datum">
|
36
|
<html:select property="namespaceId">
|
37
|
<html:options property="namespaces"/>
|
38
|
</html:select>
|
39
|
</td>
|
40
|
</tr>
|
41
|
<tr>
|
42
|
<td class="label">
|
43
|
<span class="help" title="<bean:message key="help.dataStore_description"/>">
|
44
|
<bean:message key="label.description"/>:
|
45
|
</span>
|
46
|
</td>
|
47
|
<td class="datum">
|
48
|
<html:textarea property="description" cols="60" rows="2"/>
|
49
|
</td>
|
50
|
</tr>
|
51
|
<logic:iterate id="param"
|
52
|
indexId="ctr"
|
53
|
name="dataDataStoresEditorForm"
|
54
|
property="paramKeys">
|
55
|
<logic:notEqual name="dataDataStoresEditorForm"
|
56
|
property='<%= "paramKey[" + ctr + "]"%>'
|
57
|
value="dbtype">
|
58
|
<tr>
|
59
|
<td class="label">
|
60
|
<!-- is this a required field -->
|
61
|
<logic:equal name="dataDataStoresEditorForm"
|
62
|
property='<%= "paramRequired[" + ctr + "]"%>'
|
63
|
value="true">
|
64
|
<font color="red">*</font>
|
65
|
</logic:equal>
|
66
|
|
67
|
<span class="help"
|
68
|
title="<bean:write name="dataDataStoresEditorForm"
|
69
|
property='<%= "paramHelp[" + ctr + "]" %>'/>">
|
70
|
<bean:write name="dataDataStoresEditorForm" property='<%= "paramKey[" + ctr + "]"%>'/>:
|
71
|
</span>
|
72
|
</td>
|
73
|
<td class="datum">
|
74
|
<!-- if it is not a password field -->
|
75
|
<logic:notEqual name="dataDataStoresEditorForm"
|
76
|
property='<%= "paramKey[" + ctr + "]"%>'
|
77
|
value="passwd">
|
78
|
<!--use the type information to figure out the type of widget to create -->
|
79
|
<!-- check for boolean, if so provide a drop down of true false -->
|
80
|
<logic:match name="dataDataStoresEditorForm"
|
81
|
property='<%= "paramType[" + ctr + "]"%>'
|
82
|
value="java.lang.Boolean">
|
83
|
|
84
|
<html:select property='<%= "paramValues[" + ctr + "]"%>'>
|
85
|
<html:option key="" value=""/>
|
86
|
<html:option key="false" value="false"/>
|
87
|
<html:option key="true" value="true"/>
|
88
|
</html:select>
|
89
|
</logic:match>
|
90
|
<logic:notMatch name="dataDataStoresEditorForm"
|
91
|
property='<%= "paramType[" + ctr + "]"%>'
|
92
|
value="java.lang.Boolean">
|
93
|
<!-- default to just a text box -->
|
94
|
<logic:match name="dataDataStoresEditorForm" property='<%= "paramKey[" + ctr + "]"%>' value="url">
|
95
|
<!-- if the value is empty, put an example string -->
|
96
|
<logic:equal name="dataDataStoresEditorForm" property='<%= "paramValue[" + ctr + "]"%>' value="">
|
97
|
<html:text property='<%= "paramValues[" + ctr + "]"%>' size="60" value="file:data/example.extension"/>
|
98
|
</logic:equal>
|
99
|
<!-- if the value is not empty, use the regular value -->
|
100
|
<logic:notEqual name="dataDataStoresEditorForm" property='<%= "paramValue[" + ctr + "]"%>' value="">
|
101
|
<html:text property='<%= "paramValues[" + ctr + "]"%>' size="60"/>
|
102
|
</logic:notEqual>
|
103
|
</logic:match>
|
104
|
<logic:notMatch name="dataDataStoresEditorForm" property='<%= "paramKey[" + ctr + "]"%>' value="url">
|
105
|
<html:text property='<%= "paramValues[" + ctr + "]"%>' size="60"/>
|
106
|
</logic:notMatch>
|
107
|
</logic:notMatch>
|
108
|
</logic:notEqual>
|
109
|
|
110
|
<logic:equal name="dataDataStoresEditorForm"
|
111
|
property='<%= "paramKey[" + ctr + "]"%>'
|
112
|
value="passwd">
|
113
|
<html:password property='<%= "paramValues[" + ctr + "]"%>' size="12"/>
|
114
|
</logic:equal>
|
115
|
|
116
|
</td>
|
117
|
</tr>
|
118
|
</logic:notEqual>
|
119
|
</logic:iterate>
|
120
|
|
121
|
<tr>
|
122
|
<td class="label"> </td>
|
123
|
<td class="datum">
|
124
|
<html:submit>
|
125
|
<bean:message key="label.submit"/>
|
126
|
</html:submit>
|
127
|
|
128
|
<html:reset>
|
129
|
<bean:message key="label.reset"/>
|
130
|
</html:reset>
|
131
|
</td>
|
132
|
</tr>
|
133
|
</table>
|
134
|
</html:form>
|
135
|
</logic:present>
|
136
|
<br>
|
137
|
<font color="red">*</font> = <bean:message key="config.data.store.editor.requiredField"/>
|
138
|
|