geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r478113 - /geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp
Date Wed, 22 Nov 2006 10:24:04 GMT
Author: vamsic007
Date: Wed Nov 22 02:24:03 2006
New Revision: 478113

URL: http://svn.apache.org/viewvc?view=rev&rev=478113
Log:
JavaScript validation of input fields.  Rev 478109 in trunk.

Modified:
    geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp

Modified: geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp?view=diff&rev=478113&r1=478112&r2=478113
==============================================================================
--- geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp
(original)
+++ geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp
Wed Nov 22 02:24:03 2006
@@ -14,14 +14,27 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 --%>
+
+<%-- $Rev$ $Date$ --%>
+
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <portlet:defineObjects/>
 
+<script language="JavaScript">
+var <portlet:namespace/>formName = "<portlet:namespace/>DatabaseForm";
+var <portlet:namespace/>requiredFields = new Array("name", "dbtype");
+function <portlet:namespace/>validateForm(){
+    if(!textElementsNotEmpty(<portlet:namespace/>formName,<portlet:namespace/>requiredFields))
+        return false;
+    return true;
+}
+</script>
+
 <p><b>Create Database Pool</b> -- Step 1: Select Name and Database</p>
 
 <!--   FORM TO COLLECT DATA FOR THIS PAGE   -->
-<form name="<portlet:namespace/>" action="<portlet:actionURL/>" method="POST">
+<form name="<portlet:namespace/>DatabaseForm" action="<portlet:actionURL/>"
method="POST">
     <input type="hidden" name="mode" value="process-rdbms" />
     <input type="hidden" name="user" value="${pool.user}" />
     <input type="hidden" name="password" value="${pool.password}" />
@@ -71,7 +84,7 @@
       </tr>
       <tr>
         <td></td>
-        <td><input type="submit" value="Next" /></td>
+        <td><input type="submit" value="Next" onClick="return <portlet:namespace/>validateForm();"/></td>
       </tr>
     </table>
 </form>



Mime
View raw message