1 |
3032
|
perry
|
<%@ 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 |
|
|
<%
|
6 |
|
|
//This file contains some ugly JSP code.
|
7 |
|
|
//Be wary, ye who brave the dragon's lair.
|
8 |
|
|
%>
|
9 |
|
|
|
10 |
|
|
<% try { %>
|
11 |
|
|
<html:form action="/config/data/typeEditorSubmit">
|
12 |
|
|
<table class="info">
|
13 |
|
|
<tr>
|
14 |
|
|
<td class="label">
|
15 |
|
|
<span class="help" title="<bean:message key="help.type.name"/>">
|
16 |
|
|
<bean:message key="label.name"/>:
|
17 |
|
|
</span>
|
18 |
|
|
</td>
|
19 |
|
|
<td class="datum">
|
20 |
|
|
<bean:write name="typesEditorForm" property="typeName"/>
|
21 |
|
|
</td>
|
22 |
|
|
</tr>
|
23 |
|
|
<tr>
|
24 |
|
|
<td class="label">
|
25 |
|
|
<span class="help" title="<bean:message key="help.type.style"/>">
|
26 |
|
|
<bean:message key="label.style"/>:
|
27 |
|
|
</span>
|
28 |
|
|
</td>
|
29 |
|
|
<td class="datum">
|
30 |
|
|
<html:select property="styleId">
|
31 |
|
|
<html:options property="styles"/>
|
32 |
|
|
</html:select>
|
33 |
|
|
<html:submit property="action">
|
34 |
|
|
<bean:message key="config.data.sldWizard.label"/>
|
35 |
|
|
</html:submit><br>
|
36 |
|
|
</td>
|
37 |
|
|
</tr>
|
38 |
|
|
<tr>
|
39 |
|
|
<td class="label">
|
40 |
|
|
<span class="help" title="<bean:message key="help.type.srs"/>">
|
41 |
|
|
<bean:message key="label.SRS"/>:
|
42 |
|
|
</span>
|
43 |
|
|
</td>
|
44 |
|
|
<td class="datum">
|
45 |
|
|
<table>
|
46 |
|
|
<tr>
|
47 |
|
|
<td>
|
48 |
|
|
<html:text property="SRS" size="32"/>
|
49 |
|
|
</td>
|
50 |
|
|
<td>
|
51 |
|
|
<a href="<bean:message key="label.SRSHelp.URL"/>">
|
52 |
|
|
<bean:message key="label.SRSHelp"/>
|
53 |
|
|
</a>
|
54 |
|
|
</td>
|
55 |
|
|
<td>
|
56 |
|
|
-
|
57 |
3112
|
perry
|
<a href="../../../srsHelp.do">
|
58 |
3032
|
perry
|
<bean:message key="label.SRSList"/>
|
59 |
|
|
</a>
|
60 |
|
|
</td>
|
61 |
|
|
</tr>
|
62 |
|
|
</table>
|
63 |
|
|
</td></tr>
|
64 |
|
|
<!------------------------->
|
65 |
|
|
<!------ This puts in the SRS WKT definition --->
|
66 |
|
|
|
67 |
|
|
<tr>
|
68 |
|
|
<td class="label">
|
69 |
|
|
<span class="help" title="<bean:message key="help.type.srswkt"/>">
|
70 |
|
|
<bean:message key="label.type.srswkt"/>:
|
71 |
|
|
</span>
|
72 |
|
|
</td>
|
73 |
|
|
<td class="greyedOut2">
|
74 |
|
|
<bean:write name="typesEditorForm" property="SRSWKT"/>
|
75 |
|
|
</td>
|
76 |
|
|
</tr>
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
<!-------------------------->
|
80 |
|
|
|
81 |
|
|
<tr>
|
82 |
|
|
<td class="label">
|
83 |
|
|
<span class="help" title="<bean:message key="help.type.title"/>">
|
84 |
|
|
<bean:message key="label.title"/>:
|
85 |
|
|
</span>
|
86 |
|
|
</td>
|
87 |
|
|
<td class="datum">
|
88 |
|
|
<html:text property="title" size="60"/>
|
89 |
|
|
</td>
|
90 |
|
|
</tr>
|
91 |
|
|
|
92 |
|
|
<tr>
|
93 |
|
|
<td class="label">
|
94 |
|
|
<span class="help" title="<bean:message key="help.type.bbox"/>">
|
95 |
|
|
<bean:message key="label.bbox"/>:
|
96 |
|
|
</span>
|
97 |
|
|
</td>
|
98 |
|
|
<td class="datum">
|
99 |
|
|
<html:submit property="action">
|
100 |
|
|
<bean:message key="config.data.calculateBoundingBox.label"/>
|
101 |
|
|
</html:submit><br/>
|
102 |
|
|
|
103 |
|
|
<!-------------------------------------------------------------->
|
104 |
|
|
<!----- This will add the bounding box of the data (in its CRS) to the page --->
|
105 |
|
|
<!----- Its only added if its actually been calculated (i.e. they presed the generate bbox button) --->
|
106 |
|
|
|
107 |
|
|
<logic:notEmpty name="typesEditorForm" property="dataMinX">
|
108 |
|
|
<table border=0 width=90%>
|
109 |
|
|
<tr>
|
110 |
|
|
<td class="greyedOut">
|
111 |
|
|
<span class="help" title="<bean:message key="help.type.dataminx"/>">
|
112 |
|
|
<bean:message key="label.type.dataminx"/>:
|
113 |
|
|
</span>
|
114 |
|
|
</td>
|
115 |
|
|
<td class="greyedOut">
|
116 |
|
|
<bean:write name="typesEditorForm" property="dataMinX"/>
|
117 |
|
|
</td>
|
118 |
|
|
<td class="greyedOut">
|
119 |
|
|
<span class="help" title="<bean:message key="help.type.dataminy"/>">
|
120 |
|
|
<bean:message key="label.type.dataminy"/>:
|
121 |
|
|
</span>
|
122 |
|
|
</td>
|
123 |
|
|
<td class="greyedOut">
|
124 |
|
|
<bean:write name="typesEditorForm" property="dataMinY"/>
|
125 |
|
|
</td>
|
126 |
|
|
</tr>
|
127 |
|
|
<tr>
|
128 |
|
|
<td class="greyedOut">
|
129 |
|
|
<span class="help" title="<bean:message key="help.type.datamaxx"/>">
|
130 |
|
|
<bean:message key="label.type.datamaxx"/>:
|
131 |
|
|
</span>
|
132 |
|
|
</td>
|
133 |
|
|
<td class="greyedOut">
|
134 |
|
|
<bean:write name="typesEditorForm" property="dataMaxX"/>
|
135 |
|
|
</td>
|
136 |
|
|
<td class="greyedOut">
|
137 |
|
|
<span class="help" title="<bean:message key="help.type.datamaxy"/>">
|
138 |
|
|
<bean:message key="label.type.datamaxy"/>:
|
139 |
|
|
</span>
|
140 |
|
|
</td>
|
141 |
|
|
<td class="greyedOut">
|
142 |
|
|
<bean:write name="typesEditorForm" property="dataMaxY"/>
|
143 |
|
|
</td>
|
144 |
|
|
</tr>
|
145 |
|
|
</table>
|
146 |
|
|
|
147 |
|
|
</logic:notEmpty>
|
148 |
|
|
<!-------------------------------------------------------------->
|
149 |
|
|
|
150 |
|
|
|
151 |
|
|
<table border=0>
|
152 |
|
|
<tr>
|
153 |
|
|
<td style="white-space: nowrap;">
|
154 |
|
|
<span class="help" title="<bean:message key="help.type.minx"/>">
|
155 |
|
|
<bean:message key="label.type.minx"/>:
|
156 |
|
|
</span>
|
157 |
|
|
</td>
|
158 |
|
|
<td>
|
159 |
|
|
<html:text property="minX" size="15"/>
|
160 |
|
|
</td>
|
161 |
|
|
<td style="white-space: nowrap;">
|
162 |
|
|
<span class="help" title="<bean:message key="help.type.miny"/>">
|
163 |
|
|
<bean:message key="label.type.miny"/>:
|
164 |
|
|
</span>
|
165 |
|
|
</td>
|
166 |
|
|
<td>
|
167 |
|
|
<html:text property="minY" size="15"/>
|
168 |
|
|
</td>
|
169 |
|
|
</tr>
|
170 |
|
|
<tr>
|
171 |
|
|
<td style="white-space: nowrap;">
|
172 |
|
|
<span class="help" title="<bean:message key="help.type.maxx"/>">
|
173 |
|
|
<bean:message key="label.type.maxx"/>:
|
174 |
|
|
</span>
|
175 |
|
|
</td>
|
176 |
|
|
<td>
|
177 |
|
|
<html:text property="maxX" size="15"/>
|
178 |
|
|
</td>
|
179 |
|
|
<td style="white-space: nowrap;">
|
180 |
|
|
<span class="help" title="<bean:message key="help.type.maxy"/>">
|
181 |
|
|
<bean:message key="label.type.maxy"/>:
|
182 |
|
|
</span>
|
183 |
|
|
</td>
|
184 |
|
|
<td>
|
185 |
|
|
<html:text property="maxY" size="15"/>
|
186 |
|
|
</td>
|
187 |
|
|
</tr>
|
188 |
|
|
</table>
|
189 |
|
|
</td>
|
190 |
|
|
</tr>
|
191 |
|
|
|
192 |
|
|
<tr>
|
193 |
|
|
<td class="label">
|
194 |
|
|
<span class="help" title="<bean:message key="help.dataFeatureTypeKeywords"/>">
|
195 |
|
|
<bean:message key="label.keywords"/>:
|
196 |
|
|
</span>
|
197 |
|
|
</td>
|
198 |
|
|
<td class="datum">
|
199 |
|
|
<html:textarea property="keywords" cols="60" rows="2"/>
|
200 |
|
|
</td>
|
201 |
|
|
</tr>
|
202 |
|
|
|
203 |
|
|
<tr>
|
204 |
|
|
<td class="label">
|
205 |
|
|
<span class="help" title="<bean:message key="help.dataFeatureTypeAbstract"/>">
|
206 |
|
|
<bean:message key="label.abstract"/>:
|
207 |
|
|
</span>
|
208 |
|
|
</td>
|
209 |
|
|
<td class="datum">
|
210 |
|
|
<html:textarea property="abstract" cols="60" rows="3"/>
|
211 |
|
|
</td>
|
212 |
|
|
</tr>
|
213 |
3112
|
perry
|
|
214 |
3032
|
perry
|
|
215 |
3112
|
perry
|
<tr>
|
216 |
|
|
<td class="label">
|
217 |
|
|
<span class="help" title="<bean:message key="help.wms.path"/>">
|
218 |
|
|
<bean:message key="label.wms.path"/>:
|
219 |
|
|
</span>
|
220 |
|
|
</td>
|
221 |
|
|
<td class="datum">
|
222 |
|
|
<html:text property="wmsPath" size="60"/>
|
223 |
|
|
</td>
|
224 |
|
|
</tr>
|
225 |
|
|
|
226 |
3032
|
perry
|
<tr>
|
227 |
3112
|
perry
|
<td class="label">
|
228 |
|
|
<span class="help" title="<bean:message key="help.dataFeatureTypeMetadataURLs"/>">
|
229 |
|
|
<bean:message key="label.metadataURL"/>:
|
230 |
|
|
</span>
|
231 |
|
|
</td>
|
232 |
|
|
<td class="datum">
|
233 |
|
|
<table cellspacing="0">
|
234 |
|
|
<tr>
|
235 |
|
|
<td align="left">
|
236 |
|
|
<span class="help" title="<bean:message key="help.dataFeatureTypeMetadataURLType"/>">
|
237 |
|
|
<bean:message key="label.metadataURLType"/>
|
238 |
|
|
</span>
|
239 |
|
|
</td>
|
240 |
|
|
<td align="left">
|
241 |
|
|
<span class="help" title="<bean:message key="help.dataFeatureTypeMetadataURLFormat"/>">
|
242 |
|
|
<bean:message key="label.metadataURLFormat"/>
|
243 |
|
|
</span>
|
244 |
|
|
</td>
|
245 |
|
|
<td align="left">
|
246 |
|
|
<span class="help" title="<bean:message key="help.dataFeatureTypeMetadataURLLink"/>">
|
247 |
|
|
<bean:message key="label.metadataURLLink" />
|
248 |
|
|
</span>
|
249 |
|
|
</td>
|
250 |
|
|
</tr>
|
251 |
|
|
<tr>
|
252 |
|
|
<td class="datum">
|
253 |
|
|
<html:select property="metadataLink[0].metadataType">
|
254 |
|
|
<html:options property="allMetadataURLTypes"/>
|
255 |
|
|
</html:select>
|
256 |
|
|
</td>
|
257 |
|
|
<td class="datum">
|
258 |
|
|
<html:text property="metadataLink[0].type"/>
|
259 |
|
|
</td>
|
260 |
|
|
<td class="datum">
|
261 |
|
|
<html:text property="metadataLink[0].content" size="60"/>
|
262 |
|
|
</td>
|
263 |
|
|
</tr>
|
264 |
|
|
<tr>
|
265 |
|
|
<td class="datum">
|
266 |
|
|
<html:select property="metadataLink[1].metadataType">
|
267 |
|
|
<html:options property="allMetadataURLTypes"/>
|
268 |
|
|
</html:select>
|
269 |
|
|
</td>
|
270 |
|
|
<td class="datum">
|
271 |
|
|
<html:text property="metadataLink[1].type"/>
|
272 |
|
|
</td>
|
273 |
|
|
<td class="datum">
|
274 |
|
|
<html:text property="metadataLink[1].content" size="60"/>
|
275 |
|
|
</td>
|
276 |
|
|
</tr>
|
277 |
|
|
</table>
|
278 |
|
|
</td>
|
279 |
|
|
</tr>
|
280 |
|
|
|
281 |
|
|
<tr>
|
282 |
3032
|
perry
|
<td class="label">
|
283 |
|
|
<span class="help" title="<bean:message key="help.type.cachingEnabled" />">
|
284 |
|
|
<bean:message key="label.cachingEnabled" />:
|
285 |
|
|
</span>
|
286 |
|
|
</td>
|
287 |
|
|
<td class="datum">
|
288 |
|
|
<html:checkbox property="cachingEnabled" />
|
289 |
|
|
</td>
|
290 |
|
|
</tr>
|
291 |
|
|
|
292 |
|
|
<tr>
|
293 |
|
|
<td class="label">
|
294 |
|
|
<span class="help" title="<bean:message key="help.type.cacheMaxAge" />">
|
295 |
|
|
<bean:message key="label.cacheMaxAge" />:
|
296 |
|
|
</span>
|
297 |
|
|
</td>
|
298 |
|
|
<td class="datum">
|
299 |
|
|
<html:text property="cacheMaxAge" size="10" />
|
300 |
|
|
</td>
|
301 |
|
|
</tr>
|
302 |
|
|
|
303 |
|
|
<tr>
|
304 |
|
|
<td class="label">
|
305 |
|
|
<span class="help" title="<bean:message key="help.type.base"/>">
|
306 |
|
|
<bean:message key="label.base"/>:
|
307 |
|
|
</span>
|
308 |
|
|
</td>
|
309 |
|
|
<td class="datum">
|
310 |
|
|
<html:select property="schemaBase">
|
311 |
|
|
<html:options property="allYourBase"/>
|
312 |
|
|
</html:select>
|
313 |
|
|
<html:submit property="action">
|
314 |
|
|
<bean:message key="label.change"/>
|
315 |
|
|
</html:submit>
|
316 |
|
|
</td>
|
317 |
|
|
</tr>
|
318 |
|
|
|
319 |
|
|
<% boolean first = true;
|
320 |
|
|
org.vfny.geoserver.form.data.AttributeDisplay attributeDisplay = null;;
|
321 |
|
|
org.vfny.geoserver.form.data.AttributeForm attributeForm = null;
|
322 |
|
|
|
323 |
|
|
org.vfny.geoserver.form.data.TypesEditorForm form =
|
324 |
|
|
(org.vfny.geoserver.form.data.TypesEditorForm) request.getAttribute("typesEditorForm");
|
325 |
|
|
java.util.List attributes = (java.util.List) form.getAttributes();
|
326 |
|
|
int attributesSize = attributes.size(); %>
|
327 |
|
|
|
328 |
|
|
<% if (!("--".equals(form.getSchemaBase())) ) { %>
|
329 |
|
|
<tr>
|
330 |
|
|
<td class="label">
|
331 |
|
|
<span class="help" title="<bean:message key="help.type.schemaName"/>">
|
332 |
|
|
<bean:message key="label.schemaName"/>:
|
333 |
|
|
</span>
|
334 |
|
|
</td>
|
335 |
|
|
<td class="datum">
|
336 |
|
|
<html:text property="schemaName" size="60"/>
|
337 |
|
|
</td>
|
338 |
|
|
</tr>
|
339 |
|
|
<% } %>
|
340 |
|
|
|
341 |
|
|
<logic:iterate id="attribute" indexId="index" name="typesEditorForm" property="attributes">
|
342 |
|
|
<tr>
|
343 |
|
|
<td class="label">
|
344 |
|
|
<bean:write name="attribute" property="name"/>:
|
345 |
|
|
</td>
|
346 |
|
|
<td class="datum">
|
347 |
|
|
<table border=0 width="100%">
|
348 |
|
|
<tr style="white-space: nowrap;">
|
349 |
|
|
|
350 |
|
|
<%
|
351 |
|
|
if (attribute instanceof org.vfny.geoserver.form.data.AttributeDisplay) {
|
352 |
|
|
attributeDisplay = (org.vfny.geoserver.form.data.AttributeDisplay) attribute; %>
|
353 |
|
|
<td width="70%"><bean:write name="attribute" property="type"/></td>
|
354 |
|
|
<td>nillable:<bean:write name="attribute" property="nillable"/></td>
|
355 |
|
|
<td>min:<bean:write name="attribute" property="minOccurs"/></td>
|
356 |
|
|
<td>max:<bean:write name="attribute" property="maxOccurs"/></td>
|
357 |
|
|
<% } else {
|
358 |
|
|
attributeForm = (org.vfny.geoserver.form.data.AttributeForm) attribute; %>
|
359 |
|
|
<td width="70%">
|
360 |
|
|
<html:select property='<%= "attributes[" + index + "].type"%>'>
|
361 |
|
|
<html:options property='<%= "attributes[" + index + "].types"%>'/>
|
362 |
|
|
</html:select>
|
363 |
|
|
<html:submit property="action">
|
364 |
|
|
<bean:message key="label.change"/>
|
365 |
|
|
</html:submit>
|
366 |
|
|
</td>
|
367 |
|
|
<td><bean:message key="label.nillable"/>:<html:checkbox property='<%= "attributes[" + index + "].nillable" %>'/></td>
|
368 |
|
|
<td><bean:message key="label.min"/>:<html:text size="2" property='<%= "attributes[" + index + "].minOccurs"%>'/></td>
|
369 |
|
|
<td><bean:message key="label.max"/>:<html:text size="2" property='<%= "attributes[" + index + "].maxOccurs"%>'/></td>
|
370 |
|
|
<td width=16>
|
371 |
|
|
<% if (first == false) { %>
|
372 |
|
|
<html:image src="/geoserver/WEB-INF/images/up.png"
|
373 |
|
|
titleKey="type.title.up"
|
374 |
|
|
property="action"
|
375 |
3112
|
perry
|
value='<%= "up_"+ index%>'/>
|
376 |
3032
|
perry
|
<% }
|
377 |
|
|
first = false; %>
|
378 |
|
|
</td>
|
379 |
|
|
<td width=16>
|
380 |
|
|
<% if (attributesSize-1 != index.intValue()) { %>
|
381 |
|
|
<html:image src="/geoserver/WEB-INF/images/down.png"
|
382 |
|
|
titleKey="type.title.down"
|
383 |
|
|
property="action"
|
384 |
3112
|
perry
|
value='<%= "down_"+ index%>'/>
|
385 |
3032
|
perry
|
<% } %>
|
386 |
|
|
</td>
|
387 |
|
|
<td width=16>
|
388 |
|
|
<html:image src="/geoserver/WEB-INF/images/delete.png"
|
389 |
|
|
titleKey="type.title.delete"
|
390 |
|
|
property="action"
|
391 |
3112
|
perry
|
value='<%= "delete_"+ index%>'/>
|
392 |
3032
|
perry
|
</td>
|
393 |
|
|
<% } %>
|
394 |
|
|
</tr>
|
395 |
|
|
<%
|
396 |
|
|
if (attributeForm != null && attributeForm.getType().equals(org.vfny.geoserver.config.AttributeTypeInfoConfig.TYPE_FRAGMENT)) {
|
397 |
|
|
%>
|
398 |
|
|
<tr>
|
399 |
|
|
<td align="left" valign="top" colspan="7">
|
400 |
|
|
<html:textarea cols="80" rows="3"
|
401 |
|
|
property='<%= "attributes[" + index + "].fragment" %>'/>
|
402 |
|
|
</td>
|
403 |
|
|
</tr>
|
404 |
|
|
<% } %>
|
405 |
|
|
</table>
|
406 |
|
|
</td>
|
407 |
|
|
</tr>
|
408 |
|
|
</logic:iterate>
|
409 |
|
|
|
410 |
|
|
|
411 |
|
|
<% if (form.getCreateableAttributes().size() != 0) { %>
|
412 |
|
|
<tr>
|
413 |
|
|
<td>
|
414 |
|
|
<html:select property="newAttribute">
|
415 |
|
|
<html:options property="createableAttributes"/>
|
416 |
|
|
</html:select>
|
417 |
|
|
</td>
|
418 |
|
|
<td>
|
419 |
|
|
<html:submit property="action">
|
420 |
|
|
<bean:message key="label.add"/>
|
421 |
|
|
</html:submit>
|
422 |
|
|
</td>
|
423 |
|
|
</tr>
|
424 |
|
|
<% } %>
|
425 |
|
|
|
426 |
|
|
<tr>
|
427 |
|
|
<td class="label">
|
428 |
|
|
|
429 |
|
|
</td>
|
430 |
|
|
<td class="datum">
|
431 |
|
|
|
432 |
|
|
<html:submit property="action">
|
433 |
|
|
<bean:message key="label.submit"/>
|
434 |
|
|
</html:submit>
|
435 |
|
|
|
436 |
|
|
<html:reset>
|
437 |
|
|
<bean:message key="label.reset"/>
|
438 |
|
|
</html:reset>
|
439 |
|
|
|
440 |
|
|
</td>
|
441 |
|
|
</tr>
|
442 |
|
|
</table>
|
443 |
|
|
</html:form>
|
444 |
|
|
|
445 |
|
|
<% } catch (Throwable hate ){
|
446 |
|
|
System.err.println( "FeatureType Editor problem:"+ hate );
|
447 |
|
|
hate.printStackTrace();
|
448 |
|
|
throw hate;
|
449 |
3112
|
perry
|
} %>
|