Solved cce and jsonexception
authorMartin Taal <martin.taal@openbravo.com>
Mon, 03 Jan 2011 22:47:27 +0100
changeset 9524 5f9747ff5f61
parent 9523 befa79fc1364
child 9525 40259034976d
Solved cce and jsonexception
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Mon Jan 03 22:47:04 2011 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Mon Jan 03 22:47:27 2011 +0100
@@ -612,8 +612,8 @@
                       // Normal data
                       Object el = element.get(1, null);
                       String value;
-                      if (el instanceof Double) {
-                        value = ((Double) el).toString();
+                      if (el instanceof Number) {
+                        value = ((Number) el).toString();
                       } else {
                         value = (String) el;
                       }
@@ -632,7 +632,9 @@
                       // We set the value as formatted in the JSONObject in the request, so that the
                       // request now is format safe and additional getFieldProperties calls do not
                       // fail
-                      rq.setRequestParameter(colId, jsonobj.getString("value"));
+                      if (jsonobj.has("value")) {
+                        rq.setRequestParameter(colId, jsonobj.getString("value"));
+                      }
                     }
                     if (changed && col.getCallout() != null) {
                       // We need to fire this callout, as the column value was changed