From cc48bcbf8fed1fa855007899873fa3d0c79e832d Mon Sep 17 00:00:00 2001 From: "David E. Jones" Date: Sun, 7 Jan 2007 05:38:24 +0000 Subject: [PATCH] Fixed problem with map-key alternative of assoc-name in the sub-content screen widget element; thanks to Scott Gray for tracking this down, and Tim Ruppert for reporting the problem git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@493653 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/ofbiz/widget/screen/ModelScreenWidget.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java b/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java index 6eaebd65fe..ab4e299f21 100644 --- a/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java +++ b/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java @@ -945,7 +945,10 @@ public abstract class ModelScreenWidget implements Serializable { // put the text attribute first, then the pcdata under the element, if both are there of course this.contentId = new FlexibleStringExpander(UtilFormatOut.checkNull(subContentElement.getAttribute("content-id"))); - this.mapKey = new FlexibleStringExpander(UtilFormatOut.checkNull(subContentElement.getAttribute("map-key"), subContentElement.getAttribute("assoc-name"))); + this.mapKey = new FlexibleStringExpander(UtilFormatOut.checkNull(subContentElement.getAttribute("map-key"))); + if (this.mapKey.isEmpty()) { + this.mapKey = new FlexibleStringExpander(UtilFormatOut.checkNull(subContentElement.getAttribute("assoc-name"))); + } this.editRequest = new FlexibleStringExpander(UtilFormatOut.checkNull(subContentElement.getAttribute("edit-request"))); this.editContainerStyle = new FlexibleStringExpander(subContentElement.getAttribute("edit-container-style")); this.enableEditName = new FlexibleStringExpander(subContentElement.getAttribute("enable-edit-name"));