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.gitThe following commit(s) were added to refs/heads/release18.12 by this push:
new 6e845cc Fixed: drop-down field not work when in a compound-widget file (OFBIZ-11676)
6e845cc is described below
commit 6e845ccfc4fe056e4e8cf2e54af9d47478d54ffa
Author: holivier <
[hidden email]>
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 096e875..fc77cdc 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
@@ -2105,11 +2105,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));
}
}