1 | <%-- $Id: edit_agent.jsp 5767 2011-09-28 07:31:39Z nicklas $ |
---|
2 | ------------------------------------------------------------------ |
---|
3 | Copyright (C) 2006 Nicklas Nordborg |
---|
4 | |
---|
5 | This file is part of BASE - BioArray Software Environment. |
---|
6 | Available at http://base.thep.lu.se/ |
---|
7 | |
---|
8 | BASE is free software; you can redistribute it and/or |
---|
9 | modify it under the terms of the GNU General Public License |
---|
10 | as published by the Free Software Foundation; either version 3 |
---|
11 | of the License, or (at your option) any later version. |
---|
12 | |
---|
13 | BASE is distributed in the hope that it will be useful, |
---|
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | GNU General Public License for more details. |
---|
17 | |
---|
18 | You should have received a copy of the GNU General Public License |
---|
19 | along with BASE. If not, see <http://www.gnu.org/licenses/>. |
---|
20 | ------------------------------------------------------------------ |
---|
21 | |
---|
22 | |
---|
23 | @author Nicklas |
---|
24 | @version 2.0 |
---|
25 | --%> |
---|
26 | <%@ page pageEncoding="UTF-8" session="false" |
---|
27 | import="net.sf.basedb.core.SessionControl" |
---|
28 | import="net.sf.basedb.core.DbControl" |
---|
29 | import="net.sf.basedb.core.Include" |
---|
30 | import="net.sf.basedb.core.Item" |
---|
31 | import="net.sf.basedb.core.ItemContext" |
---|
32 | import="net.sf.basedb.core.Permission" |
---|
33 | import="net.sf.basedb.core.JobAgent" |
---|
34 | import="net.sf.basedb.core.JobAgentSettings" |
---|
35 | import="net.sf.basedb.core.PluginDefinition" |
---|
36 | import="net.sf.basedb.core.ItemQuery" |
---|
37 | import="net.sf.basedb.core.ItemResultList" |
---|
38 | import="net.sf.basedb.core.PermissionDeniedException" |
---|
39 | import="net.sf.basedb.core.query.Orders" |
---|
40 | import="net.sf.basedb.core.query.Hql" |
---|
41 | import="net.sf.basedb.clients.web.Base" |
---|
42 | import="net.sf.basedb.clients.web.util.HTML" |
---|
43 | import="net.sf.basedb.util.Values" |
---|
44 | import="net.sf.basedb.core.plugin.GuiContext" |
---|
45 | import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
---|
46 | import="net.sf.basedb.clients.web.extensions.JspContext" |
---|
47 | import="net.sf.basedb.clients.web.extensions.edit.EditUtil" |
---|
48 | import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
---|
49 | %> |
---|
50 | <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
---|
51 | <%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
---|
52 | <% |
---|
53 | final Item itemType = Item.JOBAGENT; |
---|
54 | final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
---|
55 | final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
---|
56 | final int itemId = cc.getId(); |
---|
57 | final String ID = sc.getId(); |
---|
58 | final float scale = Base.getScale(sc); |
---|
59 | final DbControl dc = sc.newDbControl(); |
---|
60 | try |
---|
61 | { |
---|
62 | String title = null; |
---|
63 | JobAgent agent = null; |
---|
64 | Integer port = null; |
---|
65 | |
---|
66 | final int selectedPluginId = Values.getInt(request.getParameter("plugin_id"), -1); |
---|
67 | |
---|
68 | // Query to retrieve installed plugins |
---|
69 | ItemQuery<PluginDefinition> pluginQuery = PluginDefinition.getQuery(); |
---|
70 | pluginQuery.include(Include.ALL); |
---|
71 | pluginQuery.order(Orders.asc(Hql.property("name"))); |
---|
72 | |
---|
73 | if (itemId == 0) |
---|
74 | { |
---|
75 | title = "Create job agent"; |
---|
76 | cc.removeObject("item"); |
---|
77 | port = Values.getInteger(cc.getPropertyValue("port"), JobAgent.DEFAULT_PORT); |
---|
78 | } |
---|
79 | else |
---|
80 | { |
---|
81 | agent = JobAgent.getById(dc, itemId); |
---|
82 | cc.setObject("item", agent); |
---|
83 | title = "Edit job agent -- " + HTML.encodeTags(agent.getName()); |
---|
84 | agent.checkPermission(Permission.WRITE); |
---|
85 | port = agent.getPort(); |
---|
86 | } |
---|
87 | |
---|
88 | final String clazz = "class=\"text\""; |
---|
89 | final String requiredClazz = "class=\"text required\""; |
---|
90 | JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), agent); |
---|
91 | ExtensionsInvoker invoker = EditUtil.useEditExtensions(jspContext); |
---|
92 | %> |
---|
93 | <base:page type="popup" title="<%=title%>"> |
---|
94 | <base:head scripts="tabcontrol.js,linkitems.js" styles="tabcontrol.css"> |
---|
95 | <ext:scripts context="<%=jspContext%>" /> |
---|
96 | <ext:stylesheets context="<%=jspContext%>" /> |
---|
97 | <script language="JavaScript"> |
---|
98 | // Validate the "Job agent" tab |
---|
99 | function validateJobAgent() |
---|
100 | { |
---|
101 | var frm = document.forms['agent']; |
---|
102 | if (Main.trimString(frm.name.value) == '') |
---|
103 | { |
---|
104 | alert("You must enter a name"); |
---|
105 | frm.name.focus(); |
---|
106 | return false; |
---|
107 | } |
---|
108 | else if (Main.trimString(frm.external_id.value) == '') |
---|
109 | { |
---|
110 | alert("You must enter an external ID"); |
---|
111 | frm.external_id.focus(); |
---|
112 | return false; |
---|
113 | } |
---|
114 | else if (Main.trimString(frm.port.value) != '') |
---|
115 | { |
---|
116 | var port = parseInt(frm.port.value); |
---|
117 | if (port < 1 || port > 65535) |
---|
118 | { |
---|
119 | alert("The port value must be between 1 and 65535"); |
---|
120 | frm.port.focus(); |
---|
121 | return false; |
---|
122 | } |
---|
123 | } |
---|
124 | return true; |
---|
125 | } |
---|
126 | |
---|
127 | // Submit the form |
---|
128 | function saveSettings() |
---|
129 | { |
---|
130 | var frm = document.forms['agent']; |
---|
131 | if (TabControl.validateActiveTab('settings')) |
---|
132 | { |
---|
133 | var plugins = Link.getListIds(frm.plugins, 'P'); |
---|
134 | for (var i = 0; i < plugins.length; i++) |
---|
135 | { |
---|
136 | var pluginId = plugins[i]; |
---|
137 | var settings = getPluginSettings(pluginId); |
---|
138 | if (settings) |
---|
139 | { |
---|
140 | if (!settings.useDefaultMaxMemory) |
---|
141 | { |
---|
142 | Forms.createHidden(frm, 'maxMemory.'+pluginId, settings.maxMemory); |
---|
143 | } |
---|
144 | if (!settings.useDefaultTrusted) |
---|
145 | { |
---|
146 | Forms.createHidden(frm, 'trusted.'+pluginId, settings.trusted); |
---|
147 | } |
---|
148 | Forms.createHidden(frm, 'priorityBoost.'+pluginId, settings.priorityBoost); |
---|
149 | } |
---|
150 | } |
---|
151 | |
---|
152 | frm.allPlugins.value = plugins.join(','); |
---|
153 | frm.removePlugins.value = Link.getActionIds(-1, 'P').join(','); |
---|
154 | frm.submit(); |
---|
155 | } |
---|
156 | } |
---|
157 | |
---|
158 | function addPluginsOnClick() |
---|
159 | { |
---|
160 | var plugins = Link.getListIds(document.forms['agent'].plugins, 'P'); |
---|
161 | var url = '../plugindefinitions/index.jsp?ID=<%=ID%>&cmd=UpdateContext&mode=selectmultiple&callback=addPluginCallback'; |
---|
162 | url += '&exclude='+plugins.join(','); |
---|
163 | Main.openPopup(url, 'AddPlugins', 1000, 700); |
---|
164 | } |
---|
165 | function addPluginCallback(pluginId, name) |
---|
166 | { |
---|
167 | var item = Link.getItem('P', pluginId); |
---|
168 | if (!item) item = new Item('P', pluginId, name); |
---|
169 | Link.addItem(document.forms['agent'].plugins, item); |
---|
170 | pluginsOnClick(); |
---|
171 | } |
---|
172 | |
---|
173 | function removeOnClick() |
---|
174 | { |
---|
175 | Link.removeSelected(document.forms['agent'].plugins); |
---|
176 | Main.hide('pluginsettings'); |
---|
177 | } |
---|
178 | |
---|
179 | function initPlugins() |
---|
180 | { |
---|
181 | var plugins = document.forms['agent'].plugins; |
---|
182 | <% |
---|
183 | if (pluginQuery != null) |
---|
184 | { |
---|
185 | ItemResultList<PluginDefinition> plugins = pluginQuery.list(dc); |
---|
186 | for (PluginDefinition plugin : plugins) |
---|
187 | { |
---|
188 | // Default settings |
---|
189 | boolean defaultTrusted = plugin.isTrusted(); |
---|
190 | Long defaultMaxMemory = plugin.getMaxMemory(); |
---|
191 | |
---|
192 | // Specific settings |
---|
193 | JobAgentSettings settings = agent == null ? null : agent.getSettings(plugin, false); |
---|
194 | Boolean trusted = null; |
---|
195 | Long maxMemory = null; |
---|
196 | int priorityBoost = 0; |
---|
197 | if (settings != null) |
---|
198 | { |
---|
199 | trusted = settings.isTrusted(); |
---|
200 | maxMemory = settings.getMaxMemory(); |
---|
201 | priorityBoost = settings.getPriorityBoost(); |
---|
202 | %> |
---|
203 | Link.addNewItem(plugins, new Item('P', <%=plugin.getId()%>, '<%=HTML.javaScriptEncode(plugin.getName())%>')); |
---|
204 | <% |
---|
205 | } |
---|
206 | %> |
---|
207 | new PluginSetting(<%=plugin.getId()%>, '<%=trusted == null ? "" : trusted ? "1" : "0"%>', '<%=defaultTrusted ? "1" : "0"%>', '<%=Values.formatBytes(maxMemory)%>', '<%=Values.formatBytes(defaultMaxMemory)%>', '<%=priorityBoost%>'); |
---|
208 | <% |
---|
209 | } |
---|
210 | } |
---|
211 | %> |
---|
212 | } |
---|
213 | |
---|
214 | function selectPlugin(pluginId) |
---|
215 | { |
---|
216 | var frm = document.forms['agent']; |
---|
217 | for (var i = 0; i < frm.plugins.length; i++) |
---|
218 | { |
---|
219 | if (frm.plugins[i].item.id == pluginId) |
---|
220 | { |
---|
221 | frm.plugins.selectedIndex = i; |
---|
222 | pluginsOnClick(); |
---|
223 | return; |
---|
224 | } |
---|
225 | } |
---|
226 | } |
---|
227 | |
---|
228 | function init() |
---|
229 | { |
---|
230 | <% |
---|
231 | if (agent == null) |
---|
232 | { |
---|
233 | %> |
---|
234 | var frm = document.forms['agent']; |
---|
235 | frm.name.focus(); |
---|
236 | frm.name.select(); |
---|
237 | <% |
---|
238 | } |
---|
239 | %> |
---|
240 | initPlugins(); |
---|
241 | <% |
---|
242 | if (selectedPluginId != -1) |
---|
243 | { |
---|
244 | %> |
---|
245 | selectPlugin(<%=selectedPluginId%>); |
---|
246 | <% |
---|
247 | } |
---|
248 | %> |
---|
249 | } |
---|
250 | |
---|
251 | var selectedPluginId; |
---|
252 | function pluginsOnClick() |
---|
253 | { |
---|
254 | var frm = document.forms['agent']; |
---|
255 | var pluginId = frm.plugins[frm.plugins.selectedIndex].item.id; |
---|
256 | var settings = getPluginSettings(pluginId); |
---|
257 | if (settings) |
---|
258 | { |
---|
259 | Main.show('pluginsettings'); |
---|
260 | selectedPluginId = pluginId; |
---|
261 | // Set max memory |
---|
262 | frm.useDefaultMaxMemory.checked = settings.useDefaultMaxMemory; |
---|
263 | useDefaultMaxMemoryOnClick(); |
---|
264 | var defaultMaxMemory = document.getElementById("defaultMaxMemory"); |
---|
265 | defaultMaxMemory.innerHTML = settings.defaultMaxMemory; |
---|
266 | |
---|
267 | // Set trusted |
---|
268 | Forms.checkRadio(frm.trusted, settings.trusted); |
---|
269 | var defaultTrusted = document.getElementById("defaultTrusted"); |
---|
270 | defaultTrusted.innerHTML = settings.defaultTrusted == '0' ? 'no' : 'yes'; |
---|
271 | |
---|
272 | // Set priority boost |
---|
273 | frm.priorityBoost.value = settings.priorityBoost; |
---|
274 | } |
---|
275 | else |
---|
276 | { |
---|
277 | Main.hide('pluginsettings'); |
---|
278 | } |
---|
279 | } |
---|
280 | |
---|
281 | function priorityBoostOnBlur() |
---|
282 | { |
---|
283 | var frm = document.forms['agent']; |
---|
284 | var settings = getPluginSettings(selectedPluginId); |
---|
285 | if (settings) |
---|
286 | { |
---|
287 | var priorityBoost = parseInt(frm.priorityBoost.value); |
---|
288 | if (priorityBoost < 0 || priorityBoost > 10) |
---|
289 | { |
---|
290 | alert('The priority boost must be between 0 and 10'); |
---|
291 | frm.priorityBoost.focus(); |
---|
292 | return; |
---|
293 | } |
---|
294 | settings.priorityBoost = priorityBoost; |
---|
295 | } |
---|
296 | } |
---|
297 | |
---|
298 | function useDefaultMaxMemoryOnClick() |
---|
299 | { |
---|
300 | var frm = document.forms['agent']; |
---|
301 | var settings = getPluginSettings(selectedPluginId); |
---|
302 | if (settings) |
---|
303 | { |
---|
304 | var useDefault = frm.useDefaultMaxMemory.checked; |
---|
305 | settings.useDefaultMaxMemory = useDefault; |
---|
306 | frm.maxMemory.disabled = useDefault; |
---|
307 | if (!useDefault) |
---|
308 | { |
---|
309 | frm.maxMemory.focus(); |
---|
310 | frm.maxMemory.value = settings.maxMemory; |
---|
311 | } |
---|
312 | } |
---|
313 | } |
---|
314 | |
---|
315 | function maxMemoryOnBlur() |
---|
316 | { |
---|
317 | var frm = document.forms['agent']; |
---|
318 | var settings = getPluginSettings(selectedPluginId); |
---|
319 | if (settings) |
---|
320 | { |
---|
321 | settings.maxMemory = frm.maxMemory.value; |
---|
322 | } |
---|
323 | } |
---|
324 | |
---|
325 | function trustedOnClick() |
---|
326 | { |
---|
327 | var frm = document.forms['agent']; |
---|
328 | var settings = getPluginSettings(selectedPluginId); |
---|
329 | if (settings) |
---|
330 | { |
---|
331 | var selected = Forms.getCheckedRadio(frm.trusted); |
---|
332 | if (selected != null) |
---|
333 | { |
---|
334 | settings.trusted = selected.value; |
---|
335 | settings.useDefaultTrusted = settings.trusted == ''; |
---|
336 | } |
---|
337 | } |
---|
338 | } |
---|
339 | |
---|
340 | |
---|
341 | function getPluginSettings(pluginId) |
---|
342 | { |
---|
343 | return allPluginSettings['P'+pluginId]; |
---|
344 | } |
---|
345 | |
---|
346 | var allPluginSettings = new Array(); |
---|
347 | function PluginSetting(pluginId, trusted, defaultTrusted, maxMemory, defaultMaxMemory, priorityBoost) |
---|
348 | { |
---|
349 | this.pluginId = pluginId; |
---|
350 | this.trusted = trusted; |
---|
351 | this.defaultTrusted = defaultTrusted; |
---|
352 | this.useDefaultTrusted = trusted != null; |
---|
353 | this.maxMemory = maxMemory; |
---|
354 | this.defaultMaxMemory = defaultMaxMemory == '' ? 'not specified' : defaultMaxMemory; |
---|
355 | this.useDefaultMaxMemory = (maxMemory == ''); |
---|
356 | this.priorityBoost = priorityBoost; |
---|
357 | allPluginSettings['P'+pluginId] = this; |
---|
358 | } |
---|
359 | |
---|
360 | </script> |
---|
361 | </base:head> |
---|
362 | <base:body onload="init()"> |
---|
363 | <p> |
---|
364 | <form action="index.jsp?ID=<%=ID%>" method="post" name="agent" onsubmit="return false;"> |
---|
365 | <input type="hidden" name="cmd" value="UpdateItem"> |
---|
366 | |
---|
367 | <h3 class="docked"><%=title%> <base:help tabcontrol="settings" /></h3> |
---|
368 | <t:tabcontrol id="settings" contentstyle="<%="height: "+(int)(scale*280)+"px;"%>" |
---|
369 | position="bottom" remember="<%=agent != null%>" active="<%=selectedPluginId == -1 ? null : "plugins" %>" |
---|
370 | extensions="<%=invoker%>"> |
---|
371 | <t:tab id="info" title="Job agent" validate="validateJobAgent()" helpid="jobagent.edit"> |
---|
372 | <table class="form" cellspacing=0> |
---|
373 | <tr> |
---|
374 | <td class="prompt">Name</td> |
---|
375 | <td><input <%=requiredClazz%> type="text" name="name" |
---|
376 | value="<%=HTML.encodeTags(agent == null ? Values.getString(cc.getPropertyValue("name"), "New job agent") : agent.getName())%>" |
---|
377 | size="40" maxlength="<%=JobAgent.MAX_NAME_LENGTH%>"></td> |
---|
378 | </tr> |
---|
379 | <tr> |
---|
380 | <td class="prompt">External Id</td> |
---|
381 | <td><input <%=requiredClazz%> type="text" name="external_id" |
---|
382 | value="<%=HTML.encodeTags(agent == null ? cc.getPropertyValue("externalId") : agent.getExternalId())%>" |
---|
383 | size="40" maxlength="<%=JobAgent.MAX_EXTERNAL_ID_LENGTH%>"></td> |
---|
384 | </tr> |
---|
385 | <tr> |
---|
386 | <td class="prompt">Server</td> |
---|
387 | <td><input <%=clazz%> type="text" name="server" |
---|
388 | value="<%=HTML.encodeTags(agent == null ? cc.getPropertyValue("server") : agent.getServer())%>" |
---|
389 | size="40" maxlength="<%=JobAgent.MAX_SERVER_LENGTH%>"></td> |
---|
390 | </tr> |
---|
391 | <tr> |
---|
392 | <td class="prompt">Port</td> |
---|
393 | <td><input <%=clazz%> type="text" name="port" |
---|
394 | value="<%=port == null ? "" : port.toString() %>" |
---|
395 | size="12" maxlength="10" |
---|
396 | onkeypress="return Numbers.integerOnly(event)"> |
---|
397 | <span class="link" onclick="document.forms['agent'].port.value = '<%=JobAgent.DEFAULT_PORT%>'" |
---|
398 | >Use default (<%=JobAgent.DEFAULT_PORT%>)</span> |
---|
399 | </td> |
---|
400 | </tr> |
---|
401 | <tr valign=top> |
---|
402 | <td class="prompt">Description</td> |
---|
403 | <td nowrap> |
---|
404 | <textarea <%=clazz%> rows="4" cols="40" name="description" wrap="virtual" |
---|
405 | ><%=HTML.encodeTags(agent == null ? cc.getPropertyValue("description") : agent.getDescription())%></textarea> |
---|
406 | <a href="javascript:Main.zoom('Description', 'agent', 'description')" |
---|
407 | title="Edit in larger window"><base:icon image="zoom.gif" /></a> |
---|
408 | </td> |
---|
409 | </tr> |
---|
410 | </table> |
---|
411 | <div align=right> <i><base:icon image="required.gif" /> = required information</i></div> |
---|
412 | </t:tab> |
---|
413 | |
---|
414 | <t:tab id="plugins" title="Plugins" helpid="jobagent.plugins"> |
---|
415 | |
---|
416 | <table > |
---|
417 | <tr valign="top"> |
---|
418 | <td> |
---|
419 | <b>Installed plugins</b><br> |
---|
420 | <select name="plugins" size="14" multiple style="width: 15em;" |
---|
421 | onclick="pluginsOnClick()"> |
---|
422 | </select> |
---|
423 | <input type="hidden" name="removePlugins" value=""> |
---|
424 | <input type="hidden" name="allPlugins" value=""> |
---|
425 | </td> |
---|
426 | <td> |
---|
427 | <br> |
---|
428 | <table width="150"> |
---|
429 | <tr><td><base:button |
---|
430 | clazz="leftaligned buttonclass" |
---|
431 | onclick="addPluginsOnClick()" |
---|
432 | title="Add plugins…" |
---|
433 | tooltip="Add plugins to this job agent" |
---|
434 | /></td></tr> |
---|
435 | <tr><td><base:button |
---|
436 | clazz="leftaligned buttonclass" |
---|
437 | onclick="removeOnClick()" |
---|
438 | title="Remove" |
---|
439 | tooltip="Remove the selected plugins" |
---|
440 | /></td></tr> |
---|
441 | </table> |
---|
442 | |
---|
443 | <br> |
---|
444 | <div id="pluginsettings" style="display: none;"> |
---|
445 | <table border="0" cellspacing="0" class="form"> |
---|
446 | <tr> |
---|
447 | <td class="prompt">Max memory</td> |
---|
448 | <td> |
---|
449 | <input type="text" name="maxMemory" class="text" size="16" |
---|
450 | maxlength="16" |
---|
451 | onblur="maxMemoryOnBlur()"> |
---|
452 | (Use KB, MB or GB to specify memory) |
---|
453 | </td> |
---|
454 | </tr> |
---|
455 | <tr> |
---|
456 | <td style="padding-left: 10px;">-use default</td> |
---|
457 | <td> |
---|
458 | <input type="checkbox" name="useDefaultMaxMemory" |
---|
459 | onclick="useDefaultMaxMemoryOnClick()"> |
---|
460 | (<span id="defaultMaxMemory"></span>) |
---|
461 | </td> |
---|
462 | </tr> |
---|
463 | <tr> |
---|
464 | <td class="prompt">Trusted</td> |
---|
465 | <td> |
---|
466 | <input type="radio" name="trusted" value="" |
---|
467 | onclick="trustedOnClick()">default (<span id="defaultTrusted"></span>) |
---|
468 | <input type="radio" name="trusted" value="1" |
---|
469 | onclick="trustedOnClick()">yes |
---|
470 | <input type="radio" name="trusted" value="0" |
---|
471 | onclick="trustedOnClick()">no |
---|
472 | </td> |
---|
473 | </tr> |
---|
474 | <tr> |
---|
475 | <td class="prompt">Priority boost</td> |
---|
476 | <td> |
---|
477 | <input type="text" name="priorityBoost" class="text" size="12" |
---|
478 | maxlength="10" onkeypress="return Numbers.integerOnly(event)" |
---|
479 | onblur="priorityBoostOnBlur()"> |
---|
480 | </td> |
---|
481 | </tr> |
---|
482 | </table> |
---|
483 | </div> |
---|
484 | </td> |
---|
485 | </tr> |
---|
486 | </table> |
---|
487 | |
---|
488 | |
---|
489 | </t:tab> |
---|
490 | |
---|
491 | </t:tabcontrol> |
---|
492 | |
---|
493 | <table align="center"> |
---|
494 | <tr> |
---|
495 | <td width="50%"><base:button onclick="saveSettings()" title="Save" /></td> |
---|
496 | <td width="50%"><base:button onclick="window.close()" title="Cancel" /></td> |
---|
497 | </tr> |
---|
498 | </table> |
---|
499 | </form> |
---|
500 | </base:body> |
---|
501 | </base:page> |
---|
502 | <% |
---|
503 | } |
---|
504 | finally |
---|
505 | { |
---|
506 | if (dc != null) dc.close(); |
---|
507 | } |
---|
508 | %> |
---|