You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/01/01 23:03:23 UTC

svn commit: r1554687 - in /ofbiz/branches/release12.04: ./ framework/minilang/dtd/simple-methods-v2.xsd framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java

Author: jleroux
Date: Wed Jan  1 22:03:22 2014
New Revision: 1554687

URL: http://svn.apache.org/r1554687
Log:
"Applied fix from trunk for revision: 1554685  " 
------------------------------------------------------------------------
r1554685 | jleroux | 2014-01-01 23:02:17 +0100 (mer. 01 janv. 2014) | 5 lignes

Completes "Set field in (at least) widget screen does not take into account a locale for (at least) the Float type" https://issues.apache.org/jira/browse/OFBIZ-5453 for minilang.
Removes dead code.
Locale applies only when the type is also passed, like in widgets.


------------------------------------------------------------------------


Modified:
    ofbiz/branches/release12.04/   (props changed)
    ofbiz/branches/release12.04/framework/minilang/dtd/simple-methods-v2.xsd
    ofbiz/branches/release12.04/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1554685

Modified: ofbiz/branches/release12.04/framework/minilang/dtd/simple-methods-v2.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/minilang/dtd/simple-methods-v2.xsd?rev=1554687&r1=1554686&r2=1554687&view=diff
==============================================================================
--- ofbiz/branches/release12.04/framework/minilang/dtd/simple-methods-v2.xsd (original)
+++ ofbiz/branches/release12.04/framework/minilang/dtd/simple-methods-v2.xsd Wed Jan  1 22:03:22 2014
@@ -1222,7 +1222,7 @@ under the License.
                 <xs:annotation>
                     <xs:documentation>
                         A locale value (eg: en). The locale allows to pass values whose types are locale dependent (like Float, etc.).
-                        Defaults to the environment locale.
+                        Defaults to the environment locale. Works only if a type which makes sense is also passed.                        
                         
                         Optional. Attribute types: constant, ${expression}.
                     </xs:documentation>

Modified: ofbiz/branches/release12.04/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java?rev=1554687&r1=1554686&r2=1554687&view=diff
==============================================================================
--- ofbiz/branches/release12.04/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java (original)
+++ ofbiz/branches/release12.04/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java Wed Jan  1 22:03:22 2014
@@ -144,8 +144,7 @@ public final class SetOperation extends 
                 Debug.logWarning(exc, "Error evaluating scriptlet [" + this.scriptlet + "]: " + exc, module);
             }
         } else if (!this.fromFma.isEmpty()) {
-            Locale locale = methodContext.getLocale();
-            if (!this.localeFse.isEmpty()) {
+            if (!this.localeFse.isEmpty() && this.type.length() > 0) {
                 methodContext.setLocale(new Locale(this.localeFse.expandString(methodContext.getEnvMap())));
             }
             newValue = this.fromFma.get(methodContext.getEnvMap());