details:   /erp/devel/pi/rev/b3c28b0f0a3f
changeset: 10871:b3c28b0f0a3f
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Thu Feb 24 16:05:17 2011 +0100
summary:   Do not attempt to get a String from callout result if the result is 
already a String

details:   /erp/devel/pi/rev/6d32f71daedf
changeset: 10872:6d32f71daedf
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Thu Feb 24 16:08:46 2011 +0100
summary:   Do not do convertToClassicString() if the property doesn't have 
primitive type

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
 |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (18 lines):

diff -r 03a98f4b0ab0 -r 6d32f71daedf 
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
     Thu Feb 24 16:06:58 2011 +0100
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Thu Feb 24 16:08:46 2011 +0100
@@ -871,10 +871,11 @@
                       // with the new value
                       UIDefinition uiDef = 
UIDefinitionController.getInstance().getUIDefinition(
                           col.getId());
-                      if (uiDef.getDomainType() instanceof 
PrimitiveDomainType) {
+                      if (el instanceof String
+                          || !(uiDef.getDomainType() instanceof 
PrimitiveDomainType)) {
+                        rq.setRequestParameter(colId, el == null ? null : 
(String) el);
+                      } else {
                         rq.setRequestParameter(colId, 
uiDef.convertToClassicString(el));
-                      } else {
-                        rq.setRequestParameter(colId, el == null ? null : 
el.toString());
                       }
                       JSONObject jsonobj = new 
JSONObject(uiDef.getFieldProperties(inpFields
                           .get(name), true));

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to