[OFBiz] SVN: r7780 - trunk/framework/widget/src/org/ofbiz/widget/screen

jonesde@svn.ofbiz.org jonesde at svn.ofbiz.org
Tue Jun 13 03:30:12 CDT 2006


Author: jonesde
Date: 2006-06-13 03:30:09 -0500 (Tue, 13 Jun 2006)
New Revision: 7780

Modified:
   trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
Log:
Changed screen widget set action to be locale aware

Modified: trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
===================================================================
--- trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java	2006-06-13 07:55:48 UTC (rev 7779)
+++ trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java	2006-06-13 08:30:09 UTC (rev 7780)
@@ -37,6 +37,7 @@
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.ObjectType;
 import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
@@ -148,6 +149,8 @@
             // default to false
             boolean global = "true".equals(globalStr);
             
+            Locale locale = UtilMisc.ensureLocale(context.get("locale"));
+            
             Object newValue = null;
             if (this.fromScope != null && this.fromScope.equals("user")) {
                 if (!this.fromField.isEmpty()) {
@@ -181,7 +184,7 @@
             
             if (UtilValidate.isNotEmpty(this.type)) {
                 try {
-                    newValue = ObjectType.simpleTypeConvert(newValue, this.type, null, null);
+                    newValue = ObjectType.simpleTypeConvert(newValue, this.type, null, locale);
                 } catch (GeneralException e) {
                     String errMsg = "Could not convert field value for the field: [" + this.field.getOriginalName() + "] to the [" + this.type + "] type for the value [" + newValue + "]: " + e.toString();
                     Debug.logError(e, errMsg, module);



More information about the Svn mailing list