changeset 1482:cd8a146d29cd

Update chart if properties are changed successfully. flys-client/trunk@3537 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 23 Dec 2011 13:38:42 +0000
parents 3dc70e44fc95
children 843eed27390d
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java
diffstat 2 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Fri Dec 23 09:26:07 2011 +0000
+++ b/flys-client/ChangeLog	Fri Dec 23 13:38:42 2011 +0000
@@ -1,3 +1,8 @@
+2011-12-23  Raimund Renkert <raimund.renkert@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java:
+	  Update chart if properties are changed successfully.
+
 2011-12-23  Raimund Renkert <raimund.renkert@intevation.de>
 
 	* src/main/webapp/images/properties.gif:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java	Fri Dec 23 09:26:07 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java	Fri Dec 23 13:38:42 2011 +0000
@@ -57,7 +57,7 @@
         GWT.create(CollectionAttributeService.class);
 
     /** The tab called the editor window. */
-    protected OutputTab tab;
+    protected ChartOutputTab tab;
 
     /** The tabset for chart properties */
     protected TabSet tabs;
@@ -73,7 +73,7 @@
      * Setup editor dialog.
      * @param callerTab      The tab called the editor window.
      */
-    public ChartPropertiesEditor(OutputTab callerTab) {
+    public ChartPropertiesEditor(ChartOutputTab callerTab) {
         this.tab = callerTab;
         this.tabs = new TabSet();
 
@@ -377,20 +377,21 @@
         final String loc    = config.getLocale();
 
         GWT.log("PropertiesEditor.updateCollection via RPC now");
-        this.hide();
 
         updater.update(collection, loc, new AsyncCallback<Collection>() {
             public void onFailure(Throwable caught) {
                 GWT.log("Could not update collection attributes.");
                 SC.warn(MSG.getString(caught.getMessage()));
             }
-
-
             public void onSuccess(Collection collection) {
+                updateChartTab();
             }
         });
-
     }
 
-
+    protected void updateChartTab() {
+        this.hide();
+        this.tab.updateChartInfo();
+        this.tab.updateChartPanel();
+    }
 }

http://dive4elements.wald.intevation.org