You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by tk...@apache.org on 2013/09/11 14:39:26 UTC

git commit: configuration service mapped list to strings, which was a bug. commit fixes MARMOTTA-231

Updated Branches:
  refs/heads/develop 213495ccd -> 6d60b0476


configuration service mapped list to strings, which was a bug. commit fixes MARMOTTA-231


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/6d60b047
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/6d60b047
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/6d60b047

Branch: refs/heads/develop
Commit: 6d60b0476f5523ed0d002bd2a65a9acb2a10ff5d
Parents: 213495c
Author: tkurz <tk...@apache.org>
Authored: Wed Sep 11 14:38:58 2013 +0200
Committer: tkurz <tk...@apache.org>
Committed: Wed Sep 11 14:38:58 2013 +0200

----------------------------------------------------------------------
 .../js/widgets/configurator/configurator.coffee      | 15 +++++++++++++--
 .../webservices/config/ConfigurationWebService.java  |  2 +-
 2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/6d60b047/platform/marmotta-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee b/platform/marmotta-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
index a8e8a51..b2ec849 100644
--- a/platform/marmotta-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
+++ b/platform/marmotta-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
@@ -544,10 +544,21 @@ class Client
 
         str = "{"
         for value,index in data
-          str += '"'+value.key + '":"'+value.getValue() + '"'
+          v = '"'+value.getValue()+'"'
+          if (value.getValue().split(",").length > 1)
+            x = value.getValue().split(",")
+            v = "["
+            for val,i in x
+              v += '"'+val+'"'
+              if i < x.length-1
+                v += ','
+
+            v += "]"
+
+          str += '"'+value.key + '":'+v
           str += "," if index < data.length-1
         str += "}"
-
+        console.log str
         $.ajax data =
           type : 'POST'
           contentType: "application/json"

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/6d60b047/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/config/ConfigurationWebService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/config/ConfigurationWebService.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/config/ConfigurationWebService.java
index 464132e..1da3836 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/config/ConfigurationWebService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/config/ConfigurationWebService.java
@@ -121,7 +121,7 @@ public class ConfigurationWebService {
         ObjectMapper mapper = new ObjectMapper();
         try {
             //log.info(getContentData(request.getReader()));
-            Map<String,String> values = mapper.readValue(request.getInputStream(), new TypeReference<HashMap<String,String>>(){});
+            Map<String,Object> values = mapper.readValue(request.getInputStream(), new TypeReference<HashMap<String,Object>>(){});
             configurationService.setConfigurations(values);
         } catch (IOException e) {
             return Response.serverError().build();