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()
This commit is contained in:
holivier
2020-05-29 11:26:40 +02:00
parent 7ceebcc45e
commit e4ee439e27
@@ -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));
}
}