Revision: 3614
          http://vexi.svn.sourceforge.net/vexi/?rev=3614&view=rev
Author:   mkpg2
Date:     2009-08-20 15:19:17 +0000 (Thu, 20 Aug 2009)

Log Message:
-----------
Make friendlier. JS to Dynamic conversions default to coerceToString(), instead 
of throwing an Exception.

Modified Paths:
--------------
    trunk/core/org.ibex.js/src/org/ibex/js/JSPojoWrapper.java

Modified: trunk/core/org.ibex.js/src/org/ibex/js/JSPojoWrapper.java
===================================================================
--- trunk/core/org.ibex.js/src/org/ibex/js/JSPojoWrapper.java   2009-08-20 
15:17:49 UTC (rev 3613)
+++ trunk/core/org.ibex.js/src/org/ibex/js/JSPojoWrapper.java   2009-08-20 
15:19:17 UTC (rev 3614)
@@ -108,8 +108,7 @@
                        if(js instanceof JSNumber.B)
                        return Boolean.valueOf(JSU.toBoolean(js));
        }
-        if(js instanceof JSPrimitive)
-            return JSU.toString(js);
+
         
         if(js instanceof JSArray){
             JSArray js_ = (JSArray)js;
@@ -129,7 +128,9 @@
             }
             return r;
         }
-        throw new JSExn("Cannot convert request: " + js);
+//      if(js instanceof JSPrimitive)
+//          return JSU.toString(js);
+        return JSU.toString(js);
     }
     
     static public JS dynamicToJs(Object o) throws JSExn{
@@ -163,6 +164,6 @@
             return JSU.S((String) o);
         }
         
-        throw new JSExn("Cannot convert response: " + o);   
+        throw new JSExn("Could not convert response, unknown object: " + o);   
     }
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to