You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2006/10/24 10:26:14 UTC
svn commit: r467275 - in
/webservices/axis2/branches/java/1_1/modules/webapp: ActivateService.jsp
InActivateService.jsp
Author: chamil
Date: Tue Oct 24 01:26:13 2006
New Revision: 467275
URL: http://svn.apache.org/viewvc?view=rev&rev=467275
Log:
Deactivate and activate pages now show a message saying that no services are present as opposed to showing a combo with no items. This fixes jira AXIS2-1157.[Error when deactivate button is clicked with no item selected.]
Modified:
webservices/axis2/branches/java/1_1/modules/webapp/ActivateService.jsp
webservices/axis2/branches/java/1_1/modules/webapp/InActivateService.jsp
Modified: webservices/axis2/branches/java/1_1/modules/webapp/ActivateService.jsp
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/webapp/ActivateService.jsp?view=diff&rev=467275&r1=467274&r2=467275
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/webapp/ActivateService.jsp (original)
+++ webservices/axis2/branches/java/1_1/modules/webapp/ActivateService.jsp Tue Oct 24 01:26:13 2006
@@ -32,24 +32,30 @@
<p>The services that are inactive are listed below. Although you can activate the services from this page, once system is restarted the services will be inactive again</p>
</td>
</tr>
- <tr>
+ <tr>
+ <%
+HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+Collection col = services.values();
+String html = "";
+int count = 0;
+
+for (Iterator iterator = col.iterator(); iterator.hasNext();) {
+ AxisService axisServices = (AxisService) iterator.next();
+ if(!axisServices.isActive()){
+ count++;
+ html += "<option value='" + axisServices.getName() + "'>";
+ html += axisServices.getName() + "</option>";
+ }
+}
+request.getSession().setAttribute(Constants.SERVICE_MAP,null);
+if (count > 0) {
+%>
+
<td width="20%"> Select Service : </td>
<td width="80%">
- <select name="axisService" class="selectBoxes" >
-
- <%
- HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
- Collection col = services.values();
- for (Iterator iterator = col.iterator(); iterator.hasNext();) {
- AxisService axisServices = (AxisService) iterator.next();
- if(!axisServices.isActive()){
- %> <option value="<%=axisServices.getName()%>">
- <%=axisServices.getName()%></option> <%
- }
- }
- request.getSession().setAttribute(Constants.SERVICE_MAP,null);
- %>
- </td>
+ <select name="axisService" class="selectBoxes">
+ <%=html%>
+ </select>
</tr>
<tr>
<td width="20%">Activate Service </td>
@@ -61,7 +67,14 @@
<td>
<input name="submit" type="submit" value=" Activate " >
<input name="reset" type="reset" value=" Clear " >
- </td>
+ </td>
+<%
+} else {
+ %>
+ <td colspan="2">No inactive services present.</td>
+ <%
+}
+%>
</tr>
</table>
Modified: webservices/axis2/branches/java/1_1/modules/webapp/InActivateService.jsp
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/webapp/InActivateService.jsp?view=diff&rev=467275&r1=467274&r2=467275
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/webapp/InActivateService.jsp (original)
+++ webservices/axis2/branches/java/1_1/modules/webapp/InActivateService.jsp Tue Oct 24 01:26:13 2006
@@ -29,27 +29,34 @@
<table width="100%" border="0">
<tr>
<td colspan="2" >
- <p>Only the services that are active are listed below. Note that although you can activate a service from this page,once system is restarted the service will be active again</p>
+ <p>Only the services that are active are listed below. Note that although you can activate a service from this page, once system is restarted the service will be active again</p>
</td>
</tr>
- <tr>
+ <tr>
+<%
+HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+Collection col = services.values();
+String html = "";
+int count = 0;
+
+for (Iterator iterator = col.iterator(); iterator.hasNext();) {
+ AxisService axisServices = (AxisService) iterator.next();
+ if(axisServices.isActive()){
+ count++;
+ html += "<option value='" + axisServices.getName() + "'>";
+ html += axisServices.getName() + "</option>";
+ }
+}
+request.getSession().setAttribute(Constants.SERVICE_MAP,null);
+if (count > 0) {
+%>
+
<td width="20%"> Select Service : </td>
<td width="80%">
- <select name="axisService" class="selectBoxes" >
-
- <%
- HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
- Collection col = services.values();
- for (Iterator iterator = col.iterator(); iterator.hasNext();) {
- AxisService axisServices = (AxisService) iterator.next();
- if(axisServices.isActive()){
- %> <option value="<%=axisServices.getName()%>">
- <%=axisServices.getName()%></option> <%
- }
- }
- request.getSession().setAttribute(Constants.SERVICE_MAP,null);
- %>
- </td>
+ <select name="axisService" class="selectBoxes">
+<%=html%>
+ </select>
+ </td>
</tr>
<tr>
<td width="20%">Deactivate Service </td>
@@ -61,7 +68,14 @@
<td>
<input name="submit" type="submit" value=" Deactivate " >
<input name="reset" type="reset" value=" Clear " >
- </td>
+ </td>
+<%
+} else {
+ %>
+ <td colspan="2">No active services present.</td>
+ <%
+}
+%>
</tr>
</table>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org