svn commit r16434 - trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

svn commit r16434 - trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino

svn-9
Author: keith
Date: Thu May  1 03:13:28 2008
New Revision: 16434

Log:

Fixing Mashup-738

Modified:
   trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JSToOMConverter.java

Modified: trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JSToOMConverter.java
==============================================================================
--- trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JSToOMConverter.java (original)
+++ trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JSToOMConverter.java Thu May  1 03:13:28 2008
@@ -216,6 +216,13 @@
 
     public static String convertToDateTime(Object jsObject) throws AxisFault {
         try {
+
+            // If the user returned a valid date a s a String we use the converterUtil to validate
+            // it and return it back.
+            if (jsObject instanceof String) {
+                Calendar calendar = ConverterUtil.convertToDateTime((String)jsObject);
+                return ConverterUtil.convertToString(calendar);
+            }
             Date date = (Date) Context.jsToJava(jsObject, Date.class);
             Calendar calendar = Calendar.getInstance();
             calendar.clear();

_______________________________________________
Wsf-javascript-dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev
Loading...