diff flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 39:4187a797fc3d

Implemented the step forward mechanism in the CollectionView and added the river map to the initial widget. flys-client/trunk@1472 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 15 Mar 2011 14:35:41 +0000
parents b6b89ff1adee
children d573ae975330
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Mon Mar 14 18:09:21 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Tue Mar 15 14:35:41 2011 +0000
@@ -126,8 +126,8 @@
      * This method handles the initial layout stuff.
      */
     protected void init() {
-        setWidth(600);
-        setHeight(400);
+        setWidth(700);
+        setHeight(600);
 
         layout.setWidth100();
 
@@ -143,7 +143,7 @@
         tabs.addTab(parameterTab);
 
         if (isNew()) {
-            tabs.setTabTitle(0, "MODUL");
+            tabs.setTabTitle(0, messages.new_calculation());
             tabs.updateTab(0, renderNew());
         }
     }
@@ -257,7 +257,7 @@
         }
 
         Data data = new DefaultData(
-            messages.river_selection(),
+            "river",
             messages.river_selection(),
             null,
             items,
@@ -363,6 +363,20 @@
     public void onStepForward(StepForwardEvent event) {
         GWT.log("CollectionView - onStepForward()");
         GWT.log("TODO: IMPLEMENT FEED!");
+        String serverUrl = Config.getInstance().getServerUrl();
+
+        forwardService.go(serverUrl, artifact, event.getData(),
+            new AsyncCallback<Artifact>() {
+                public void onFailure(Throwable caught) {
+                    GWT.log("Could not feed the artifact.");
+                    GWT.log(caught.getMessage());
+                }
+
+                public void onSuccess(Artifact artifact) {
+                    GWT.log("Successfully feed the artifact.");
+                    setArtifact(artifact);
+                }
+        });
     }
 
 

http://dive4elements.wald.intevation.org