Return-Path: X-Original-To: apmail-continuum-commits-archive@www.apache.org Delivered-To: apmail-continuum-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32302104A3 for ; Fri, 23 Jan 2015 18:48:22 +0000 (UTC) Received: (qmail 85740 invoked by uid 500); 23 Jan 2015 18:48:20 -0000 Delivered-To: apmail-continuum-commits-archive@continuum.apache.org Received: (qmail 85590 invoked by uid 500); 23 Jan 2015 18:48:20 -0000 Mailing-List: contact commits-help@continuum.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@continuum.apache.org Delivered-To: mailing list commits@continuum.apache.org Received: (qmail 85439 invoked by uid 99); 23 Jan 2015 18:48:20 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jan 2015 18:48:20 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 7A72AAC0044; Fri, 23 Jan 2015 18:48:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1654308 - in /continuum/trunk: continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ continuum-webapp/src/main/resources/template/simple/ continuum-webapp/src/main/webapp/WEB-INF/jsp/ Date: Fri, 23 Jan 2015 18:48:20 -0000 To: commits@continuum.apache.org From: batkinson@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150123184820.7A72AAC0044@hades.apache.org> Author: batkinson Date: Fri Jan 23 18:48:19 2015 New Revision: 1654308 URL: http://svn.apache.org/r1654308 Log: [CONTINUUM-2723] Attempting to edit a project results in an internal error Added: continuum/trunk/continuum-webapp/src/main/resources/template/simple/ continuum/trunk/continuum-webapp/src/main/resources/template/simple/dynamic-attributes.ftl Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectEdit.jsp Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java?rev=1654308&r1=1654307&r2=1654308&view=diff ============================================================================== --- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java (original) +++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java Fri Jan 23 18:48:19 2015 @@ -85,6 +85,28 @@ public class MavenTwoProjectTest assertTextPresent( projectGroupScmRootUrl ); } + @Test( dependsOnMethods = { "testAddMavenTwoProject" } ) + public void testEditProjectName() + throws Exception + { + // Create a project to use + testAddMavenTwoProject(); + + // Navigate to project's edit page + clickLinkWithText(projectName); + clickButtonWithValue("Edit"); + assertPage("Continuum - Update Continuum Project"); + + // Edit the name of the project and save it + String newName = "New Name"; + setFieldValue("projectSave_name", newName); + clickButtonWithValue("Save"); + + // Verify that the save succeeded + assertPage("Continuum - Continuum Project"); + assertTextPresent(String.format("Continuum Project \"%s\"", newName)); + } + /** * Test flat multi module project with names that start with the same letter */ Added: continuum/trunk/continuum-webapp/src/main/resources/template/simple/dynamic-attributes.ftl URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/template/simple/dynamic-attributes.ftl?rev=1654308&view=auto ============================================================================== --- continuum/trunk/continuum-webapp/src/main/resources/template/simple/dynamic-attributes.ftl (added) +++ continuum/trunk/continuum-webapp/src/main/resources/template/simple/dynamic-attributes.ftl Fri Jan 23 18:48:19 2015 @@ -0,0 +1,37 @@ +<#-- +/* + * $Id$ + * + * 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. + */ +--> +<#-- + TODO: Fixes CONTINUUM-2723, remove this after upgrading to struts-2.3.20+ +--> +<#if (parameters.dynamicAttributes?? && parameters.dynamicAttributes?size > 0)><#rt/> +<#assign aKeys = parameters.dynamicAttributes.keySet()><#rt/> +<#list aKeys as aKey><#rt/> + <#assign keyValue = parameters.dynamicAttributes.get(aKey)/> + <#if keyValue?is_string> + <#assign value = struts.translateVariables(keyValue)!keyValue/> + <#else> + <#assign value = keyValue?string/> + + ${aKey}="${value?html}"<#rt/> +<#rt/> +<#rt/> \ No newline at end of file Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectEdit.jsp URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectEdit.jsp?rev=1654308&r1=1654307&r2=1654308&view=diff ============================================================================== --- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectEdit.jsp (original) +++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectEdit.jsp Fri Jan 23 18:48:19 2015 @@ -76,4 +76,4 @@ - \ No newline at end of file +