geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r631659 - /geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/index.jsp
Date Wed, 27 Feb 2008 17:23:21 GMT
Author: jbohn
Date: Wed Feb 27 09:23:20 2008
New Revision: 631659

URL: http://svn.apache.org/viewvc?rev=631659&view=rev
Log:
GERONIMO-3867 Add validation to ensure a configuration is selected for export.

Modified:
    geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/index.jsp

Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/index.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/index.jsp?rev=631659&r1=631658&r2=631659&view=diff
==============================================================================
--- geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/index.jsp
(original)
+++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/index.jsp
Wed Feb 27 09:23:20 2008
@@ -18,6 +18,20 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+
+<script>
+function <portlet:namespace/>validateForm(){
+    with(document.<portlet:namespace/>ExportForm){
+        if (configId.value==null || configId.value=="") {
+            alert("Please select a configuration to export.");
+            return false;
+        }
+    }
+    return true;
+}
+</script>
+
+
 <portlet:defineObjects/>
 <p>This portlet lets you install or create Geronimo plugins.
     This can be used to install new features into a Geronimo server at runtime.</p>
@@ -61,7 +75,7 @@
    <i>Note: at present, you must manually add a <tt>META-INF/geronimo-plugin.xml</tt>
    file to the CAR after you export it in order for it to be a valid plugin.</i></p>
 
-<form name="<portlet:namespace/>ExportForm" action="<portlet:actionURL/>"
method="POST">
+<form name="<portlet:namespace/>ExportForm" action="<portlet:actionURL/>"
method="POST" onsubmit="return <portlet:namespace/>validateForm()">
     <input type="hidden" name="mode" value="configure-before" />
     <select name="configId">
         <option />



Mime
View raw message