changeset 1331:aa2313e0f18d

#366 Modifications on theme description in theme panels are now persisted to artifact server. flys-client/trunk@2976 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 17 Oct 2011 09:18:22 +0000
parents ece7d9484574
children ab2b1a4a9ead
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java flys-client/src/main/java/de/intevation/flys/client/shared/model/AttributedTheme.java flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultTheme.java flys-client/src/main/java/de/intevation/flys/client/shared/model/Theme.java
diffstat 5 files changed, 31 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Fri Oct 14 14:01:32 2011 +0000
+++ b/flys-client/ChangeLog	Mon Oct 17 09:18:22 2011 +0000
@@ -1,3 +1,15 @@
+2011-10-17  Ingo Weinzierl <ingo@intevation.de>
+
+	flys/issue366 (W-INFO / Abflusskurve, Diagramm: Umbenennen von Themen und Anzeige im Diagramm)
+
+	* src/main/java/de/intevation/flys/client/shared/model/Theme.java,
+	  src/main/java/de/intevation/flys/client/shared/model/DefaultTheme.java,
+	  src/main/java/de/intevation/flys/client/shared/model/AttributedTheme.java:
+	  Added a setter method for descriptions.
+
+	* src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java:
+	  Description modifications will now be persisted to artifact server.
+
 2011-10-14  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/FLYSConstants.properties:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java	Fri Oct 14 14:01:32 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java	Mon Oct 17 09:18:22 2011 +0000
@@ -398,7 +398,10 @@
         int         row = event.getRowNum();
         FacetRecord rec = (FacetRecord) list.getRecord(row);
 
-        activateTheme(rec.getTheme(), rec.getActive());
+        Theme theme = rec.getTheme();
+
+        theme.setDescription(rec.getName());
+        activateTheme(theme, rec.getActive());
 
         updateCollection();
     }
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/AttributedTheme.java	Fri Oct 14 14:01:32 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/AttributedTheme.java	Mon Oct 17 09:18:22 2011 +0000
@@ -120,6 +120,14 @@
 
 
     @Override
+    public void setDescription(String description) {
+        if (description != null && description.length() > 0) {
+            addAttr("description", description);
+        }
+    }
+
+
+    @Override
     public boolean equals(Object o) {
         if (!(o instanceof AttributedTheme)) {
             return false;
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultTheme.java	Fri Oct 14 14:01:32 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultTheme.java	Mon Oct 17 09:18:22 2011 +0000
@@ -80,6 +80,11 @@
     }
 
 
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+
     public boolean equals(Object o) {
         if (!(o instanceof DefaultTheme)) {
             return false;
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/Theme.java	Fri Oct 14 14:01:32 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/Theme.java	Mon Oct 17 09:18:22 2011 +0000
@@ -24,6 +24,8 @@
 
     String getDescription();
 
+    void setDescription(String description);
+
     boolean equals(Object o);
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org