[ofbiz-framework] branch trunk updated: Improved: Ensure MacroFormRenderer uses ModelFormField#getCurrentContainerId rather than ModelFormField#getIdName to ensure any FlexibleStringExpander expression defined in the field's id-name property is processed before rendering into the container FTL macro.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch trunk updated: Improved: Ensure MacroFormRenderer uses ModelFormField#getCurrentContainerId rather than ModelFormField#getIdName to ensure any FlexibleStringExpander expression defined in the field's id-name property is processed before rendering into the container FTL macro.

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 584f1ed  Improved: Ensure MacroFormRenderer uses ModelFormField#getCurrentContainerId rather than ModelFormField#getIdName to ensure any FlexibleStringExpander expression defined in the field's id-name property is processed before rendering into the container FTL macro.
584f1ed is described below

commit 584f1edda5396adeee6ad3d1793e3a3351426714
Author: Daniel Watford <[hidden email]>
AuthorDate: Sun Feb 23 18:17:07 2020 +0000

    Improved: Ensure MacroFormRenderer uses
    ModelFormField#getCurrentContainerId rather than
    ModelFormField#getIdName to ensure any FlexibleStringExpander expression
    defined in the field's id-name property is processed before rendering
    into the container FTL macro.
   
    (OFBIZ-4035)
---
 .../java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java
index 029d383..40803fb 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java
@@ -3395,7 +3395,7 @@ public final class MacroFormRenderer implements FormStringRenderer {
 
     @Override
     public void renderContainerFindField(Appendable writer, Map<String, Object> context, ContainerField containerField) throws IOException {
-        String id = containerField.getModelFormField().getIdName();
+        final String id = containerField.getModelFormField().getCurrentContainerId(context);
         String className = UtilFormatOut.checkNull(containerField.getModelFormField().getWidgetStyle());
         StringWriter sr = new StringWriter();
         sr.append("<@renderContainerField ");