diff gwt-client/src/main/java/org/dive4elements/river/client/client/FLYS.java @ 6475:b0b0ba6e7bb0

Add client side servlets and service stubs for ServerInfoService.
author Christian Lins <christian.lins@intevation.de>
date Thu, 27 Jun 2013 14:48:21 +0200
parents 766cba02ae4a
children ac6c41fcae55
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYS.java	Thu Jun 27 12:02:09 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYS.java	Thu Jun 27 14:48:21 2013 +0200
@@ -13,7 +13,6 @@
 import com.google.gwt.event.shared.UmbrellaException;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.google.gwt.xml.client.XMLParser;
-
 import com.smartgwt.client.util.SC;
 import com.smartgwt.client.widgets.HTMLPane;
 import com.smartgwt.client.widgets.Window;
@@ -21,6 +20,12 @@
 import com.smartgwt.client.widgets.events.CloseClickHandler;
 import com.smartgwt.client.widgets.layout.VLayout;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.Set;
+
 import org.dive4elements.river.client.client.event.CollectionChangeEvent;
 import org.dive4elements.river.client.client.event.CollectionChangeHandler;
 import org.dive4elements.river.client.client.services.ArtifactService;
@@ -33,6 +38,8 @@
 import org.dive4elements.river.client.client.services.GetArtifactServiceAsync;
 import org.dive4elements.river.client.client.services.RiverService;
 import org.dive4elements.river.client.client.services.RiverServiceAsync;
+import org.dive4elements.river.client.client.services.ServerInfoService;
+import org.dive4elements.river.client.client.services.ServerInfoServiceAsync;
 import org.dive4elements.river.client.client.services.UserService;
 import org.dive4elements.river.client.client.services.UserServiceAsync;
 import org.dive4elements.river.client.client.ui.CollectionView;
@@ -40,6 +47,7 @@
 import org.dive4elements.river.client.client.ui.FLYSView;
 import org.dive4elements.river.client.client.ui.FLYSWorkspace;
 import org.dive4elements.river.client.client.ui.ProjectList;
+import org.dive4elements.river.client.client.ui.wq.WQAutoTabSet;
 import org.dive4elements.river.client.shared.model.Artifact;
 import org.dive4elements.river.client.shared.model.Collection;
 import org.dive4elements.river.client.shared.model.CollectionItem;
@@ -47,13 +55,6 @@
 import org.dive4elements.river.client.shared.model.River;
 import org.dive4elements.river.client.shared.model.User;
 
-import org.dive4elements.river.client.client.ui.wq.WQAutoTabSet;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.MissingResourceException;
-import java.util.Set;
-
 
 /**
  * Entry point classes define <code>onModuleLoad()</code>.
@@ -68,6 +69,8 @@
     /** The UserService used to retrieve information about the current user. */
     protected UserServiceAsync userService = GWT.create(UserService.class);
 
+    protected ServerInfoServiceAsync serverInfoService = GWT.create(ServerInfoService.class);
+
     /** The RiverService used to retrieve the supported rivers of the server.*/
     protected RiverServiceAsync riverService = GWT.create(RiverService.class);
 
@@ -135,6 +138,8 @@
         //    }
         //});
 
+        initConfiguration();
+
         VLayout vertical = new VLayout();
         vertical.setLayoutMargin(1);
         vertical.setWidth100();
@@ -148,11 +153,24 @@
 
         vertical.draw();
 
-        initConfiguration();
-
         Config config = Config.getInstance();
         String locale = config.getLocale();
 
+        serverInfoService.getConfig(locale, new AsyncCallback<Map<String,String>>() {
+
+            @Override
+            public void onSuccess(Map<String, String> result) {
+                GWT.log("serverInfoService.callBack.onSuccess");
+                GWT.log("help-url=" + result.get("help-url"));
+            }
+
+            @Override
+            public void onFailure(Throwable caught) {
+               GWT.log("serverInfoService.callBack.onFailure");
+
+            }
+        });
+
         userService.getCurrentUser(locale, new AsyncCallback<User>() {
             @Override
             public void onFailure(Throwable caught) {

http://dive4elements.wald.intevation.org