[ofbiz-framework] branch trunk 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 trunk 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 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 097db39  fixed: sort-order (field) not works in CompoundWidgets file (OFBIZ-11708)
097db39 is described below

commit 097db39ee03905fe502180d9a0dc3bf635b546e6
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 dcff3eb..20ca57f 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
@@ -646,7 +646,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");