add distinction between remote and standalone for getting the geoService
authorKatja Luther <k.luther@bgbm.org>
Mon, 12 Oct 2015 11:22:06 +0000 (13:22 +0200)
committerKatja Luther <k.luther@bgbm.org>
Mon, 12 Oct 2015 11:22:06 +0000 (13:22 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java

index e3021facf203f57fbf358539619f00bdf82624d9..138a0e760e1fd26c56f20604fa18269b58ea021a 100644 (file)
@@ -108,10 +108,14 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<F
                // FIXME due to a bug in the rest map service we have to ensure that width will always be an even number
                // image.calculateWidth() % 2 == 1 ? image.calculateWidth() + 1 :
                int width = image.calculateWidth();
                // FIXME due to a bug in the rest map service we have to ensure that width will always be an even number
                // image.calculateWidth() % 2 == 1 ? image.calculateWidth() + 1 :
                int width = image.calculateWidth();
-
+                IEditGeoService editGeoService;
                List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});
                List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});
-
-               IEditGeoService editGeoService = ((CdmApplicationRemoteConfiguration)CdmStore.getCurrentApplicationConfiguration()).getEditGeoService();
+               if(CdmStore.getCurrentApplicationConfiguration() instanceof CdmApplicationRemoteConfiguration) {
+                   editGeoService = ((CdmApplicationRemoteConfiguration)CdmStore.getCurrentApplicationConfiguration()).getEditGeoService();
+               }else{
+                   editGeoService =(IEditGeoService) CdmStore.getCurrentApplicationConfiguration().getBean(
+                       "editGeoService");
+               }
                String parameter = editGeoService.getDistributionServiceRequestParameterString(
                                getTaxonDescriptions(),
                 false,
                String parameter = editGeoService.getDistributionServiceRequestParameterString(
                                getTaxonDescriptions(),
                 false,