From 93d19b67e64c5ef7808b549170013a87ecb0f3d3 Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Wed, 27 Jan 2010 15:46:45 +0000
Subject: [PATCH] bug fixed: showing correct version in PhosphoNetX GUI

SVN: 14529
---
 .../generic/client/web/client/application/Client.java    | 8 +++++++-
 .../client/web/client/application/PhosphoNetXClient.java | 9 +++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java
index e0eeb0e7052..db21eb38bbd 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java
@@ -139,7 +139,7 @@ public class Client implements EntryPoint
         final UrlParamsHelper urlParamsHelper = new UrlParamsHelper(viewContext);
         urlParamsHelper.initUrlParams();
 
-        final IClientServiceAsync service = viewContext.getService();
+        final IClientServiceAsync service = getServiceForRetrievingApplicationInfo(viewContext);
         service.getApplicationInfo(new AbstractAsyncCallback<ApplicationInfo>(viewContext)
             {
 
@@ -160,6 +160,12 @@ public class Client implements EntryPoint
                 }
             });
     }
+    
+    protected IClientServiceAsync getServiceForRetrievingApplicationInfo(
+            IViewContext<ICommonClientServiceAsync> context)
+    {
+        return context.getService();
+    }
 
     /**
      * A version of onModuleLoad specifically for tests. Ignore the state in the session and go directly
diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/PhosphoNetXClient.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/PhosphoNetXClient.java
index 99f44cc76ba..c5f3b03896b 100644
--- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/PhosphoNetXClient.java
+++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/client/web/client/application/PhosphoNetXClient.java
@@ -16,6 +16,7 @@
 
 package ch.systemsx.cisd.openbis.plugin.phosphonetx.client.web.client.application;
 
+import ch.systemsx.cisd.openbis.generic.client.web.client.IClientServiceAsync;
 import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.Client;
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
@@ -47,4 +48,12 @@ public class PhosphoNetXClient extends Client
         return new ClientPluginFactoryProvider(commonContext);
     }
 
+    @Override
+    protected IClientServiceAsync getServiceForRetrievingApplicationInfo(
+            IViewContext<ICommonClientServiceAsync> context)
+    {
+        return new ViewContext(context).getService();
+    }
+
+
 }
-- 
GitLab