archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r440329 - in /maven/archiva/trunk/archiva-webapp/src/main: java/org/apache/maven/archiva/web/validator/ resources/ resources/org/apache/maven/archiva/web/action/admin/ webapp/WEB-INF/jsp/admin/ webapp/WEB-INF/jsp/admin/include/
Date Tue, 05 Sep 2006 12:09:22 GMT
Author: oching
Date: Tue Sep  5 05:09:18 2006
New Revision: 440329

URL: http://svn.apache.org/viewvc?view=rev&rev=440329
Log:
PR: MRM-150

Added validation on the forms.

Added:
    maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/
    maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java
    maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java
    maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/errorMessages.jsp
Modified:
    maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureProxiedRepositoryAction-validation.xml
    maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureRepositoryAction-validation.xml
    maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureSyncedRepositoryAction-addSelectedSyncedRepository-validation.xml
    maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureSyncedRepositoryAction-validation.xml
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addProxiedRepository.jsp
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addRepository.jsp
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addSyncedRepository.jsp
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/configure.jsp
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxiedRepository.jsp
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editSyncedRepository.jsp
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/managedRepositoryForm.jspf
    maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/proxiedRepositoryForm.jspf

Added: maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java?view=auto&rev=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java
(added)
+++ maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java
Tue Sep  5 05:09:18 2006
@@ -0,0 +1,62 @@
+package org.apache.maven.archiva.web.validator;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.opensymphony.xwork.validator.validators.ValidatorSupport;
+import com.opensymphony.xwork.validator.ValidationException;
+import com.opensymphony.xwork.validator.ValidatorContext;
+
+/**
+ *
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class IntervalValidator
+    extends ValidatorSupport
+{
+
+    public void validate( Object obj )
+        throws ValidationException
+    {
+        String snapshotsPolicy = ( String ) getFieldValue( "snapshotsPolicy", obj );
+        String releasesPolicy = ( String ) getFieldValue( "releasesPolicy", obj );
+        Integer snapshotsInterval = ( Integer ) getFieldValue( "snapshotsInterval", obj );
+        Integer releasesInterval = ( Integer ) getFieldValue( "releasesInterval", obj );
+
+        ValidatorContext ctxt = getValidatorContext();
+
+        if( !snapshotsPolicy.equals( "interval" ) )
+        {
+            if( snapshotsInterval.intValue() != 0 )
+            {
+                ctxt.addActionError( "Snapshots Interval must be set to zero." );
+            }
+        }
+              
+        if( !releasesPolicy.equals( "interval" ) )
+        {
+            if( releasesInterval.intValue() != 0 )
+            {
+                ctxt.addActionError( "Releases Interval must be set to zero." );
+            }
+        }
+
+        if( ctxt.hasActionErrors() )
+        {
+            return;
+        }
+    }
+}

Added: maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java?view=auto&rev=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java
(added)
+++ maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java
Tue Sep  5 05:09:18 2006
@@ -0,0 +1,111 @@
+package org.apache.maven.archiva.web.validator;
+
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.opensymphony.xwork.validator.validators.ValidatorSupport;
+import com.opensymphony.xwork.validator.ValidationException;
+import com.opensymphony.xwork.validator.ValidatorContext;
+
+/**
+ * Validator for synced repository form. The values to be validated depends on the
+ * selected sync method to be used.
+ *
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class SyncedRepositoryValidator
+    extends ValidatorSupport
+{
+
+    public void validate( Object obj )
+        throws ValidationException
+    {
+
+        String method = ( String ) getFieldValue( "method", obj );
+        ValidatorContext ctxt = getValidatorContext();
+
+        if( method.equals( "rsync" ) )
+        {
+            String rsyncHost = ( String ) getFieldValue( "rsyncHost", obj );
+            if( rsyncHost == null || rsyncHost.equals("") )
+            {
+                ctxt.addActionError( "Rsync host is required." );
+            }
+
+            String rsyncDirectory = ( String ) getFieldValue( "rsyncDirectory", obj );
+            if( rsyncDirectory == null || rsyncDirectory.equals("") )
+            {
+                ctxt.addActionError( "Rsync directory is required." );
+            }
+
+            String rsyncMethod = ( String ) getFieldValue( "rsyncMethod", obj );
+            if( rsyncMethod == null || rsyncMethod.equals("") )
+            {
+                ctxt.addActionError( "Rsync method is required." );
+            }
+            else
+            {
+                if( !rsyncMethod.equals( "anonymous" ) && !rsyncMethod.equals( "ssh"
) )
+                {
+                    ctxt.addActionError( "Invalid rsync method" );
+                }
+            }
+
+            String username = ( String ) getFieldValue( "username", obj );
+            if( username == null || username.equals("") )
+            {
+                ctxt.addActionError( "Username is required." );
+            }
+
+        }
+        else if ( method.equals( "svn" ) )
+        {
+            String svnUrl = ( String ) getFieldValue( "svnUrl", obj );
+            if( svnUrl == null || svnUrl.equals("") )
+            {
+                ctxt.addActionError( "SVN url is required." );
+            }
+
+            String username = ( String ) getFieldValue( "username", obj );
+            if( username == null || username.equals("") )
+            {
+                ctxt.addActionError( "Username is required." );
+            }
+        }
+        else if ( method.equals( "cvs" ) )
+        {
+            String cvsRoot = ( String ) getFieldValue( "cvsRoot", obj );
+            if( cvsRoot == null || cvsRoot.equals("") )
+            {
+                ctxt.addActionError( "CVS root is required." );
+            }
+        }
+        else if ( method.equals( "file" ) )
+        {
+            String directory = ( String ) getFieldValue( "directory", obj );
+            if( directory == null || directory.equals("") )
+            {
+                ctxt.addActionError( "Directory is required." );
+            }
+        }
+
+        if( ctxt.hasActionErrors() )
+        {
+            return;
+        }
+    }
+
+}

Modified: maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureProxiedRepositoryAction-validation.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureProxiedRepositoryAction-validation.xml?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureProxiedRepositoryAction-validation.xml
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureProxiedRepositoryAction-validation.xml
Tue Sep  5 05:09:18 2006
@@ -24,17 +24,69 @@
     <field-validator type="requiredstring">
       <message>You must enter the repository identifier.</message>
     </field-validator>
+    <!--field-validator type="regex">
+      <param name="expression"><![CDATA[([A-Z][a-z][0-9])]]></param>
+      <message>Id must not have special characters.</message>
+    </field-validator-->
   </field>
   <field name="name">
     <field-validator type="requiredstring">
       <message>You must enter the repository name.</message>
     </field-validator>
   </field>
+
+  <!-- deng todo: check if the entered repo url exists -->
   <field name="url">
     <field-validator type="requiredstring">
       <message>You must enter the repository URL.</message>
     </field-validator>
   </field>
+    <field name="snapshotsInterval">
+    <field-validator type="regex">
+      <param name="expression"><![CDATA[([0-9])]]></param>
+      <message>The value must be numeric</message>
+    </field-validator>
+  </field>
+  <field name="releasesInterval">
+    <field-validator type="regex">
+      <param name="expression"><![CDATA[([0-9])]]></param>
+      <message>The value must be numeric</message>
+    </field-validator>
+  </field>
+
+  <!-- deng todo: check if the interval validator is still valid -->
+  <validator type="interval">
+    <message/>
+  </validator>
+
+  <field name="layout">
+    <field-validator type="required">
+      <message>Repository type is required.</message>
+    </field-validator>
+    <field-validator type="fieldexpression">
+      <param name="expression">layout in {"legacy", "default"} </param>
+      <message>Invalid repository type.</message>
+    </field-validator>
+  </field>
+  <field name="snapshotsPolicy">
+    <field-validator type="fieldexpression">
+      <param name="expression">snapshotsPolicy in { "disabled", "daily", "hourly",
"never", "interval" }</param>
+      <message>Invalid snapshot policy.</message>
+    </field-validator>
+  </field>
+    <field name="releasesPolicy">
+    <field-validator type="fieldexpression">
+      <param name="expression">releasesPolicy in { "disabled", "daily", "hourly", "never",
"interval" }</param>
+      <message>Invalid releases policy.</message>
+    </field-validator>
+  </field>
+
+  <field name="managedRepository">
+    <field-validator type="requiredstring">
+      <message>A managed repository must be selected.</message>
+    </field-validator>
+  </field>
+
   <!-- TODO: validate managed repository -->
   <!-- TODO: validate layout -->
   <!-- TODO: validate policies -->

Modified: maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureRepositoryAction-validation.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureRepositoryAction-validation.xml?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureRepositoryAction-validation.xml
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureRepositoryAction-validation.xml
Tue Sep  5 05:09:18 2006
@@ -30,10 +30,16 @@
       <message>You must enter the repository name.</message>
     </field-validator>
   </field>
+  <!-- deng todo: validate if the specified directory exists -->
   <field name="directory">
     <field-validator type="requiredstring">
       <message>You must enter the repository directory.</message>
     </field-validator>
   </field>
-  <!-- TODO: validate layout -->
+  <field name="layout">
+    <field-validator type="fieldexpression">
+      <param name="expression">layout in {"legacy", "default"} </param>
+      <message>Invalid repository type.</message>
+    </field-validator>
+  </field>
 </validators>

Modified: maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureSyncedRepositoryAction-addSelectedSyncedRepository-validation.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureSyncedRepositoryAction-addSelectedSyncedRepository-validation.xml?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureSyncedRepositoryAction-addSelectedSyncedRepository-validation.xml
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureSyncedRepositoryAction-addSelectedSyncedRepository-validation.xml
Tue Sep  5 05:09:18 2006
@@ -29,6 +29,25 @@
       <message>You must enter the repository name.</message>
     </field-validator>
   </field>
+  <field name="layout">
+    <field-validator type="requiredstring">
+      <message>Select repository type.</message>
+    </field-validator>
+    <field-validator type="fieldexpression">
+      <param name="expression">layout in {"legacy", "default"} </param>
+      <message>Invalid repository type.</message>
+    </field-validator>
+  </field>
+  <field name="managedRepository">
+    <field-validator type="requiredstring">
+      <message>A managed repository must be selected.</message>
+    </field-validator>
+  </field>
+
+  <validator type="syncedrepo">
+    <message/>
+  </validator>
+
   <!-- TODO: validate managed repository -->
   <!-- TODO: validate layout -->
   <!-- TODO: validate sync settings, depending on what method -->

Modified: maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureSyncedRepositoryAction-validation.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureSyncedRepositoryAction-validation.xml?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureSyncedRepositoryAction-validation.xml
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/resources/org/apache/maven/archiva/web/action/admin/ConfigureSyncedRepositoryAction-validation.xml
Tue Sep  5 05:09:18 2006
@@ -24,5 +24,9 @@
     <field-validator type="requiredstring">
       <message>You must enter the synchronization method.</message>
     </field-validator>
+    <field-validator type="fieldexpression">
+      <param name="expression">method in { "rsync", "cvs", "svn", "file" }</param>
+      <message>Invalid method.</message>
+    </field-validator>
   </field>
 </validators>

Added: maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml?view=auto&rev=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml (added)
+++ maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml Tue Sep  5 05:09:18
2006
@@ -0,0 +1,18 @@
+<validators>
+  <validator name="required" class="com.opensymphony.xwork.validator.validators.RequiredFieldValidator"/>
+  <validator name="requiredstring" class="com.opensymphony.xwork.validator.validators.RequiredStringValidator"/>
+  <validator name="int" class="com.opensymphony.xwork.validator.validators.IntRangeFieldValidator"/>
+  <validator name="double" class="com.opensymphony.xwork.validator.validators.DoubleRangeFieldValidator"/>
+  <validator name="date" class="com.opensymphony.xwork.validator.validators.DateRangeFieldValidator"/>
+  <validator name="expression" class="com.opensymphony.xwork.validator.validators.ExpressionValidator"/>
+  <validator name="fieldexpression" class="com.opensymphony.xwork.validator.validators.FieldExpressionValidator"/>
+  <validator name="email" class="com.opensymphony.xwork.validator.validators.EmailValidator"/>
+  <validator name="url" class="com.opensymphony.xwork.validator.validators.URLValidator"/>
+  <validator name="visitor" class="com.opensymphony.xwork.validator.validators.VisitorFieldValidator"/>
+  <validator name="conversion" class="com.opensymphony.xwork.validator.validators.ConversionErrorFieldValidator"/>
+  <validator name="stringlength" class="com.opensymphony.xwork.validator.validators.StringLengthFieldValidator"/>
+  <validator name="regex" class="com.opensymphony.xwork.validator.validators.RegexFieldValidator"/>
+  <validator name="interval" class="org.apache.maven.archiva.web.validator.IntervalValidator"/>
+  <validator name="syncedrepo" class="org.apache.maven.archiva.web.validator.SyncedRepositoryValidator"/>

+</validators>
+

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addProxiedRepository.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addProxiedRepository.jsp?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addProxiedRepository.jsp
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addProxiedRepository.jsp
Tue Sep  5 05:09:18 2006
@@ -30,6 +30,8 @@
 
   <h2>Add Proxied Repository</h2>
 
+  <%@ include file="errorMessages.jsp" %>
+  
   <ww:actionmessage/>
   <ww:form method="post" action="addProxiedRepository" namespace="/admin" validate="true">
     <ww:textfield name="id" label="Identifier" size="10"/>
@@ -45,4 +47,4 @@
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addRepository.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addRepository.jsp?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addRepository.jsp
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addRepository.jsp
Tue Sep  5 05:09:18 2006
@@ -32,7 +32,7 @@
 
   <ww:actionmessage/>
   <ww:form method="post" action="addRepository" namespace="/admin" validate="true">
-    <ww:textfield name="id" label="Identifier" size="10"/>
+    <ww:textfield name="id" label="Identifier" size="10" required="true"/>
     <%@ include file="/WEB-INF/jsp/admin/include/managedRepositoryForm.jspf" %>
     <ww:checkbox name="indexed" fieldValue="true" value="true" label="Indexed"/>
     <ww:submit value="Add Repository"/>
@@ -45,4 +45,4 @@
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addSyncedRepository.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addSyncedRepository.jsp?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addSyncedRepository.jsp
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addSyncedRepository.jsp
Tue Sep  5 05:09:18 2006
@@ -31,9 +31,11 @@
 
   <h2>Add Synced Repository</h2>
 
+  <%@ include file="errorMessages.jsp" %>
+
   <ww:actionmessage/>
   <ww:form method="post" action="addSelectedSyncedRepository" namespace="/admin" validate="true">
-    <ww:textfield name="id" label="Identifier" size="10"/>
+    <ww:textfield name="id" label="Identifier" size="10" required="true"/>
     <%@ include file="/WEB-INF/jsp/admin/include/syncedRepositoryForm.jspf" %>
 
     <ww:submit value="Add Repository"/>
@@ -46,4 +48,4 @@
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/configure.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/configure.jsp?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/configure.jsp (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/configure.jsp Tue
Sep  5 05:09:18 2006
@@ -29,7 +29,7 @@
 <div id="contentArea">
   <ww:actionmessage/>
   <ww:form method="post" action="saveConfiguration" namespace="/admin" validate="true">
-    <ww:textfield name="indexPath" label="Index Directory" size="100"/>
+    <ww:textfield name="indexPath" label="Index Directory" size="100" required="true"/>
     <ww:textfield name="indexerCronExpression" label="Indexing Schedule"/>
     <ww:textfield name="reporterCronExpression" label="Reporting Schedule"/>
     <ww:hidden name="proxy.protocol" value="http"/>
@@ -47,4 +47,4 @@
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxiedRepository.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxiedRepository.jsp?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxiedRepository.jsp
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxiedRepository.jsp
Tue Sep  5 05:09:18 2006
@@ -30,6 +30,8 @@
 
   <h2>Edit Proxied Repository</h2>
 
+  <%@ include file="errorMessages.jsp" %>
+  
   <ww:actionmessage/>
   <ww:form method="post" action="editProxiedRepository" namespace="/admin" validate="true">
     <ww:hidden name="id"/>
@@ -44,4 +46,4 @@
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editSyncedRepository.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editSyncedRepository.jsp?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editSyncedRepository.jsp
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editSyncedRepository.jsp
Tue Sep  5 05:09:18 2006
@@ -31,6 +31,8 @@
 
   <h2>Edit Synced Repository</h2>
 
+  <%@ include file="errorMessages.jsp" %>
+  
   <ww:actionmessage/>
   <ww:form method="post" action="editSyncedRepository" namespace="/admin" validate="true">
     <ww:hidden name="id"/>
@@ -46,4 +48,4 @@
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>

Added: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/errorMessages.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/errorMessages.jsp?view=auto&rev=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/errorMessages.jsp
(added)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/errorMessages.jsp
Tue Sep  5 05:09:18 2006
@@ -0,0 +1,8 @@
+<p>
+<ww:if test="hasActionErrors()">
+  <b style="color: red;" >Errors:</b>
+  <ww:iterator value="actionErrors">
+    <li style="color: red;"><ww:property/></li>
+  </ww:iterator>
+</ww:if>
+</p>
\ No newline at end of file

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/managedRepositoryForm.jspf
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/managedRepositoryForm.jspf?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/managedRepositoryForm.jspf
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/managedRepositoryForm.jspf
Tue Sep  5 05:09:18 2006
@@ -16,8 +16,8 @@
 <%@ taglib prefix="ww" uri="/webwork" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
-<ww:textfield name="name" label="Name" size="50" />
-<ww:textfield name="directory" label="Directory" size="100" />
+<ww:textfield name="name" label="Name" size="50" required="true" />
+<ww:textfield name="directory" label="Directory" size="100" required="true"/>
 <ww:select list="#@java.util.LinkedHashMap@{'default' : 'Maven 2.x Repository', 'legacy'
: 'Maven 1.x Repository'}"
            name="layout" label="Type" />
 <ww:checkbox name="includeSnapshots" fieldValue="true" label="Snapshots Included" />

Modified: maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/proxiedRepositoryForm.jspf
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/proxiedRepositoryForm.jspf?view=diff&rev=440329&r1=440328&r2=440329
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/proxiedRepositoryForm.jspf
(original)
+++ maven/archiva/trunk/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/proxiedRepositoryForm.jspf
Tue Sep  5 05:09:18 2006
@@ -15,8 +15,8 @@
   --%>
 
 <%@ taglib prefix="ww" uri="/webwork" %>
-<ww:textfield name="name" label="Name" size="50" />
-<ww:textfield name="url" label="URL" size="50" />
+<ww:textfield name="name" label="Name" size="50" required="true"/>
+<ww:textfield name="url" label="URL" size="50" required="true"/>
 <ww:select list="#@java.util.LinkedHashMap@{'default' : 'Maven 2.x Repository', 'legacy'
: 'Maven 1.x Repository'}"
            name="layout" label="Type" />
 <ww:select name="snapshotsPolicy" label="Snapshots" list="#@java.util.LinkedHashMap@{



Mime
View raw message