continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1599890 - in /continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/admin/EditPomAction.java webapp/WEB-INF/jsp/admin/editPom.jsp
Date Wed, 04 Jun 2014 05:14:14 GMT
Author: brett
Date: Wed Jun  4 05:14:14 2014
New Revision: 1599890

URL: http://svn.apache.org/r1599890
Log:
fix editing a company POM

Hack no longer worked, easier to use a direct variable as passing in the
properties in the hash form did not work either

Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/EditPomAction.java
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editPom.jsp

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/EditPomAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/EditPomAction.java?rev=1599890&r1=1599889&r2=1599890&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/EditPomAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/EditPomAction.java
Wed Jun  4 05:14:14 2014
@@ -60,6 +60,8 @@ public class EditPomAction
 
     private Model companyModel;
 
+    private String organizationLogo;
+
     /**
      * @plexus.requirement
      */
@@ -68,11 +70,9 @@ public class EditPomAction
     public String execute()
         throws IOException, ArtifactInstallationException, SettingsConfigurationException
     {
-        // TODO: hack for passed in String[]
-        String[] logo = (String[]) companyModel.getProperties().get( "organization.logo"
);
-        if ( logo != null )
+        if ( organizationLogo != null )
         {
-            companyModel.getProperties().put( "organization.logo", logo[0] );
+            companyModel.getProperties().setProperty( "organization.logo", organizationLogo
);
         }
 
         companyPomHandler.save( companyModel, helper.getLocalRepository() );
@@ -110,6 +110,18 @@ public class EditPomAction
                 companyModel.setArtifactId( companyPom.getArtifactId() );
             }
         }
+
+        organizationLogo = companyModel.getProperties().getProperty( "organization.logo"
);
+    }
+
+    public String getOrganizationLogo()
+    {
+        return organizationLogo;
+    }
+
+    public void setOrganizationLogo( String organizationLogo )
+    {
+        this.organizationLogo = organizationLogo;
     }
 
     public Model getCompanyModel()

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editPom.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editPom.jsp?rev=1599890&r1=1599889&r2=1599890&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editPom.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editPom.jsp Wed Jun
 4 05:14:14 2014
@@ -45,8 +45,7 @@
   </tr>
   <s:textfield name="companyModel.organization.name" size="40" label="%{getText('appearance.companyPom.organizationName.label')}"/>
   <s:textfield name="companyModel.organization.url" size="70" label="%{getText('appearance.companyPom.organizationUrl.label')}"/>
-  <%-- TODO: how to get it to be a string, not a String[]? --%>
-  <s:textfield name="companyModel.properties['organization.logo']" size="70" label="%{getText('appearance.companyPom.organizationLogoUrl.label')}"/>
+  <s:textfield name="organizationLogo" size="70" label="%{getText('appearance.companyPom.organizationLogoUrl.label')}"/>
   <s:submit value="%{getText('save')}"/>
 </s:form>
 



Mime
View raw message