continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r689275 - in /continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/admin/ resources/localization/ resources/org/apache/maven/continuum/web/action/admin/
Date Tue, 26 Aug 2008 22:42:11 GMT
Author: olamy
Date: Tue Aug 26 15:42:10 2008
New Revision: 689275

URL: http://svn.apache.org/viewvc?rev=689275&view=rev
Log:
[CONTINUUM-1836] Validation for Build Environment doesn't work
Submitted by John Michael Luy


Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
    continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ProfileAction-saveProfile-validation.xml

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java?rev=689275&r1=689274&r2=689275&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
Tue Aug 26 15:42:10 2008
@@ -105,6 +105,18 @@
         try
         {
             Profile stored = profileService.getProfile( profile.getId() );
+
+            if ( StringUtils.isEmpty( profile.getName() ) )
+            {
+                if ( stored != null )
+                {
+                    profile = stored;
+                }
+
+                this.addFieldError( "profile.name", getResourceBundle().getString( "profile.name.required"
) );
+                return INPUT;
+            }
+
             if ( stored == null )
             {
                 this.profile = profileService.addProfile( profile );

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=689275&r1=689274&r2=689275&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Tue Aug 26 15:42:10 2008
@@ -690,6 +690,7 @@
 profile.jdk.path.message = The JDK Path (JAVA_HOME value)
 profile.no.installations = No installations available
 profile.name.already.exists = A Build Environment with the same name already exists
+profile.name.required = You must define a name.
 
 # ----------------------------------------------------------------------
 # Page: Installations List

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties?rev=689275&r1=689274&r2=689275&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
Tue Aug 26 15:42:10 2008
@@ -685,6 +685,7 @@
 profile.jdk.path.message = Le Chemin du JDK (Valeur de JAVA_HOME)
 profile.no.installations = Aucune installation disponible
 profile.name.already.exists = Un environnement de Build avec le meme nom existe deja.
+profile.name.required = Vous devez sp\u00e9cifier un nom.
 
 # ----------------------------------------------------------------------
 # Page: Installations List

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties?rev=689275&r1=689274&r2=689275&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
Tue Aug 26 15:42:10 2008
@@ -400,6 +400,7 @@
 profile.page.title         = Continuum - Build do Perfil
 profile.section.title      = Perfil
 profile.name.already.exists = A Profile with the same name already exists
+profile.name.required = VocĂȘ deve definir um nome.
 
 profilesList.page.title    = Perfis de Build 
 profilesList.section.title = Perfis de Build

Modified: continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ProfileAction-saveProfile-validation.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ProfileAction-saveProfile-validation.xml?rev=689275&r1=689274&r2=689275&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ProfileAction-saveProfile-validation.xml
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ProfileAction-saveProfile-validation.xml
Tue Aug 26 15:42:10 2008
@@ -1,30 +0,0 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you 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.
-  -->
-
-<!DOCTYPE validators PUBLIC
-    "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
-    "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
-
-<validators>
-  <field name="profile.name">
-    <field-validator type="requiredstring">
-      <message key="profile.name.required"/>
-    </field-validator>
-  </field>
-</validators>



Mime
View raw message