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 e4ee439  Fixed: drop-down field not work when in a compound-widget 
file (OFBIZ-11676)
e4ee439 is described below

commit e4ee439e27e505d2ea32641e06b2fa4fa24a442e
Author: holivier <holiv...@apache.org>
AuthorDate: Fri May 8 12:27:36 2020 +0200

    Fixed: drop-down field not work when in a compound-widget file (OFBIZ-11676)
    
    When, in ModelFormField, FieldInfoWithOptions (which read xml file ) is
    call, test on tag name is done with getName() and not getLocalName() so
    none "option" is recognize when field is declare on a compound-widget
    file. getName() is change to getLocalName()
---
 .../main/java/org/apache/ofbiz/widget/model/ModelFormField.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
 
b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
index 53c8783..03264a4 100644
--- 
a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
+++ 
b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
@@ -2149,11 +2149,12 @@ public class ModelFormField {
             List<? extends Element> childElements = 
UtilXml.childElementList(element);
             if (childElements.size() > 0) {
                 for (Element childElement : childElements) {
-                    if ("option".equals(childElement.getTagName())) {
+                    String childName = childElement.getLocalName();
+                    if ("option".equals(childName)) {
                         optionSources.add(new SingleOption(childElement, 
modelFormField));
-                    } else if 
("list-options".equals(childElement.getTagName())) {
+                    } else if ("list-options".equals(childName)) {
                         optionSources.add(new ListOptions(childElement, 
modelFormField));
-                    } else if 
("entity-options".equals(childElement.getTagName())) {
+                    } else if ("entity-options".equals(childName)) {
                         optionSources.add(new EntityOptions(childElement, 
modelFormField));
                     }
                 }

Reply via email to