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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
|
<%
/*******************************************************************************
* Copyright (c) 2001, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* yyyymmdd bug Email and other contact information
* -------- -------- -----------------------------------------------------------
* 20060912 141796 gilberta@ca.ibm.com - Gilbert Andrews
*******************************************************************************/
%>
<%@ page contentType="text/html; charset=UTF-8" import="org.eclipse.wst.ws.internal.explorer.platform.uddi.perspective.*,
org.eclipse.wst.ws.internal.explorer.platform.uddi.constants.*,
org.eclipse.wst.ws.internal.explorer.platform.uddi.datamodel.*,
org.eclipse.wst.ws.internal.explorer.platform.favorites.perspective.*,
org.eclipse.wst.ws.internal.explorer.platform.perspective.*,
org.eclipse.wst.ws.internal.explorer.platform.constants.*,
org.eclipse.wst.ws.internal.explorer.platform.util.*,
java.util.*" %>
<jsp:useBean id="controller" class="org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller" scope="session"/>
<jsp:useBean id="sectionHeaderInfo" class="org.eclipse.wst.ws.internal.explorer.platform.perspective.SectionHeaderInfo" scope="request"/>
<%
UDDIPerspective uddiPerspective = controller.getUDDIPerspective();
FavoritesPerspective favPerspective = controller.getFavoritesPerspective();
NodeManager navigatorManager = uddiPerspective.getNavigatorManager();
// The selected node must be a registry node.
Node registryNode = navigatorManager.getSelectedNode();
ToolManager currentToolManager = registryNode.getCurrentToolManager();
FormTool formTool = (FormTool)(currentToolManager.getSelectedTool());
RegistryElement regElement = (RegistryElement)registryNode.getTreeElement();
regElement.refreshMeta();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=uddiPerspective.getMessage("FORM_TITLE_REGISTRY_DETAILS")%></title>
<link rel="stylesheet" type="text/css" href="<%=response.encodeURL(controller.getPathWithContext("css/windows.css"))%>">
<jsp:include page="/scripts/formsubmit.jsp" flush="true"/>
<jsp:include page="/uddi/scripts/detailstables.jsp" flush="true"/>
<script language="javascript" src="<%=response.encodeURL(controller.getPathWithContext("scripts/browserdetect.js"))%>">
</script>
<script language="javascript" src="<%=response.encodeURL(controller.getPathWithContext("scripts/resumeproxyloadpage.js"))%>">
</script>
<script language="javascript">
function setDefaults()
{
var registryDetailsNameTable = getTable("registryDetailsName");
<%
String name = regElement.getName();
boolean isError = !formTool.isInputValid(UDDIActionInputs.QUERY_INPUT_ADVANCED_REGISTRY_NAME);
%>
addDetailsSingleItemRow("registryDetailsName",false);
setDetailsNameSingleItemRow("registryDetailsName","<%=HTMLUtils.JSMangle(name)%>");
<%
if (isError)
{
%>
highlightErrantRow(registryDetailsNameTable.rows[numberOfHeaderRows],"errantRow");
<%
}
Enumeration userDefinedCategories = regElement.getUserDefinedCategories();
boolean containsUserDefinedCategories;
if (userDefinedCategories != null && userDefinedCategories.hasMoreElements())
{
%>
var registryCategoriesTable = getTable("registryUserDefinedCategories");
<%
containsUserDefinedCategories = true;
ArrayList userDefinedCategoriesList = new ArrayList();
do
{
userDefinedCategoriesList.add(userDefinedCategories.nextElement());
} while (userDefinedCategories.hasMoreElements());
CategoryModel[] userDefinedCategoriesArray = new CategoryModel[userDefinedCategoriesList.size()];
userDefinedCategoriesList.toArray(userDefinedCategoriesArray);
QuickSort.sort(userDefinedCategoriesArray,0,userDefinedCategoriesArray.length-1);
StringBuffer fileName = new StringBuffer();
for (int i=0;i<userDefinedCategoriesArray.length;i++)
{
name = userDefinedCategoriesArray[i].getDisplayName();
String tModelKey = userDefinedCategoriesArray[i].getTModelKey();
boolean checked = userDefinedCategoriesArray[i].isChecked();
fileName.setLength(0);
if (userDefinedCategoriesArray[i].isDataLoaded())
fileName.append(userDefinedCategoriesArray[i].getCategoryKey()).append(".txt");
else
fileName.append(controller.getMessage("TABLE_BLANK_PLACEHOLDER"));
boolean hasError = !formTool.isRowInputValid(UDDIActionInputs.USER_DEFINED_CATEGORIES,tModelKey);
%>
addDetailsUserDefinedCategoryRow("registryUserDefinedCategories","<%=tModelKey%>","<%=HTMLUtils.JSMangle(name)%>",<%=checked%>,"<%=HTMLUtils.JSMangle(fileName.toString())%>",<%=hasError%>);
<%
if (hasError)
{
%>
highlightErrantRow(registryCategoriesTable.rows[numberOfHeaderRows+<%=i%>],"errantRow");
<%
}
}
}
else
containsUserDefinedCategories = false;
%>
showMainForm();
}
function showMainForm()
{
var loadScreenTable = document.getElementById("loadScreen");
if (loadScreenTable.rows.length > 0)
loadScreenTable.deleteRow(0);
document.getElementById("mainScreen").style.display = "";
}
function processForm(form)
{
if (handleSubmit(form))
{
processDetailsSingleItemTable("registryDetailsName","<%=UDDIActionInputs.NAME_MODIFIED%>","<%=UDDIActionInputs.QUERY_INPUT_ADVANCED_REGISTRY_NAME%>",form);
return true;
}
return false;
}
</script>
</head>
<body dir="<%=org.eclipse.wst.ws.internal.explorer.platform.util.DirUtils.getDir()%>" class="contentbodymargin">
<div id="contentborder">
<form action="<%=response.encodeURL(controller.getPathWithContext("uddi/actions/UpdateRegistryActionJSP.jsp"))%>" method="post" target="<%=FrameNames.PERSPECTIVE_WORKAREA%>" enctype="multipart/form-data" onSubmit="return processForm(this)">
<table id="loadScreen">
<tr>
<td class="labels">
<%=controller.getMessage("MSG_LOAD_IN_PROGRESS")%>
</td>
</tr>
</table>
<div id="mainScreen" style="display:none;">
<%
String titleImagePath = "images/details_highlighted.gif";
String title = uddiPerspective.getMessage("ALT_REGISTRY_DETAILS");
%>
<%@ include file="/forms/formheader.inc" %>
<table>
<tr>
<td class="labels">
<%=uddiPerspective.getMessage("FORM_LABEL_DETAILS_EDITABLE",registryNode.getNodeName())%>
</td>
</tr>
</table>
<%
sectionHeaderInfo.clear();
sectionHeaderInfo.setContainerId("registryDetailsName");
sectionHeaderInfo.setOtherProperties(uddiPerspective.getMessage("FORM_LABEL_REGISTRY_NAME"));
%>
<jsp:include page="/uddi/forms/detailsSingleItem_table.jsp" flush="true"/>
<table>
<tr>
<td height=20> </td>
</tr>
</table>
<table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder">
<tr>
<th class="singleheadercolor" height=20 valign="bottom">
<%=uddiPerspective.getMessage("FORM_LABEL_INQUIRY_URL")%>
</th>
</tr>
<tr>
<td class="tablecells">
<%=regElement.getInquiryURL()%>
</td>
</tr>
</table>
<%
String publishURL = regElement.getPublishURL();
if (Validator.validateURL(publishURL))
{
%>
<table>
<tr>
<td height=20> </td>
</tr>
</table>
<table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder">
<tr>
<th class="singleheadercolor" height=20 valign="bottom">
<%=uddiPerspective.getMessage("FORM_LABEL_PUBLISH_URL")%>
</th>
</tr>
<tr>
<td class="tablecells">
<%=regElement.getPublishURL()%>
</td>
</tr>
</table>
<%
}
if (containsUserDefinedCategories)
{
sectionHeaderInfo.clear();
sectionHeaderInfo.setContainerId("registryUserDefinedCategories");
%>
<jsp:include page="/uddi/forms/ud_categories_table.jsp" flush="true"/>
<%
}
if (regElement.isLoggedIn())
{
%>
<table>
<tr>
<td height=20> </td>
</tr>
</table>
<table width="95%" border=0 cellpadding=3 cellspacing=0 class="tableborder">
<tr>
<th class="singleheadercolor" height=20 valign="bottom">
<%=uddiPerspective.getMessage("FORM_LABEL_USERID")%>
</th>
</tr>
<tr>
<td class="tablecells">
<%=regElement.getUserId()%>
</td>
</tr>
</table>
<%
}
String registrationURL = regElement.getRegistrationURL();
if (Validator.validateURL(registrationURL))
{
%>
<table>
<tr>
<td height=20> </td>
</tr>
</table>
<table>
<tr>
<td align="left">
<%=favPerspective.getMessage("FORM_LABEL_REGISTRY_URL",registrationURL)%>
</td>
</tr>
</table>
<%
}
%>
<jsp:useBean id="currentToolManagerHash" class="java.util.Hashtable" scope="request">
<%
currentToolManagerHash.put(ActionInputs.CURRENT_TOOL_MANAGER,currentToolManager);
%>
</jsp:useBean>
<jsp:include page="/forms/otherActions.jsp" flush="true"/>
<jsp:include page="/forms/simpleCommon_table.jsp" flush="true"/>
</div>
</form>
</div>
<script language="javascript">
setDefaults();
resumeProxyLoadPage();
</script>
</body>
</html>
|