diff --git a/applications/product/minilang/product/product/ProductServices.xml b/applications/product/minilang/product/product/ProductServices.xml index 72766b565d..84063c5a25 100644 --- a/applications/product/minilang/product/product/ProductServices.xml +++ b/applications/product/minilang/product/product/ProductServices.xml @@ -686,6 +686,7 @@ under the License. + diff --git a/applications/product/minilang/product/store/ProductStoreServices.xml b/applications/product/minilang/product/store/ProductStoreServices.xml index b763b242a1..ac8297e196 100644 --- a/applications/product/minilang/product/store/ProductStoreServices.xml +++ b/applications/product/minilang/product/store/ProductStoreServices.xml @@ -478,6 +478,7 @@ under the License. + diff --git a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/MessageElement.java b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/MessageElement.java index 4d2809a497..7e99cf40d5 100644 --- a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/MessageElement.java +++ b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/MessageElement.java @@ -29,7 +29,6 @@ import org.w3c.dom.Element; /** * Implements the <fail-message> and <fail-property> elements. - * * @see Mini-language Reference */ public final class MessageElement extends MiniLangElement { @@ -49,7 +48,7 @@ public final class MessageElement extends MiniLangElement { } private final FlexibleStringExpander messageFse; - private final String propertykey; + private final FlexibleStringExpander propertyFse; private final String propertyResource; public MessageElement(Element element, SimpleMethod simpleMethod) throws MiniLangException { @@ -61,7 +60,7 @@ public final class MessageElement extends MiniLangElement { MiniLangValidate.constantPlusExpressionAttributes(simpleMethod, element, "message"); } this.messageFse = FlexibleStringExpander.getInstance(element.getAttribute("message")); - this.propertykey = null; + this.propertyFse = null; this.propertyResource = null; } else { if (MiniLangValidate.validationOn()) { @@ -70,7 +69,7 @@ public final class MessageElement extends MiniLangElement { MiniLangValidate.constantAttributes(simpleMethod, element, "property", "resource"); } this.messageFse = null; - this.propertykey = element.getAttribute("property"); + this.propertyFse = FlexibleStringExpander.getInstance(element.getAttribute("property")); this.propertyResource = element.getAttribute("resource"); } } @@ -79,7 +78,7 @@ public final class MessageElement extends MiniLangElement { if (messageFse != null) { return messageFse.expandString(methodContext.getEnvMap()); } else { - return UtilProperties.getMessage(propertyResource, propertykey, methodContext.getEnvMap(), methodContext.getLocale()); + return UtilProperties.getMessage(propertyResource, propertyFse.expandString(methodContext.getEnvMap()), methodContext.getEnvMap(), methodContext.getLocale()); } } @@ -89,8 +88,8 @@ public final class MessageElement extends MiniLangElement { if (this.messageFse != null) { sb.append(""); } - if (this.propertykey != null) { - sb.append(""); + if (this.propertyFse != null) { + sb.append(""); } return sb.toString(); }