[ofbiz-framework] branch release18.12 updated: fixed: sort-order (field) not works in CompoundWidgets file (OFBIZ-11708)

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

[ofbiz-framework] branch release18.12 updated: fixed: sort-order (field) not works in CompoundWidgets file (OFBIZ-11708)

holivier
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/release18.12 by this push:
     new 88f87f2  fixed: sort-order (field) not works in CompoundWidgets file (OFBIZ-11708)
88f87f2 is described below

commit 88f87f27f06a6dcba3f44f6e4dda272fcc032d95
Author: holivier <[hidden email]>
AuthorDate: Sat May 16 10:46:54 2020 +0200

    fixed: sort-order (field) not works in CompoundWidgets file (OFBIZ-11708)
   
    In a form, when <sort-order tag is used, the children analyze not works
    because, getTagName() is used not the getLocalName(). getTagName()
    return "wf:sort-field" when getLocalName return "sort-field".
    So change getTagName() to getLocalName() for sort-order children
---
 .../widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java
index 3193c56..61028e3 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java
@@ -644,7 +644,7 @@ public abstract class ModelForm extends ModelWidget {
             fieldGroupList.add(lastFieldGroup);
             // read in sort-field
             for (Element sortFieldElement : UtilXml.childElementList(sortOrderElement)) {
-                String tagName = sortFieldElement.getTagName();
+                String tagName = sortFieldElement.getLocalName();
                 if ("sort-field".equals(tagName)) {
                     String fieldName = sortFieldElement.getAttribute("name");
                     String position = sortFieldElement.getAttribute("position");