Author: hansbak
Date: Tue Nov 15 07:41:50 2011
New Revision: 1202081
URL:
http://svn.apache.org/viewvc?rev=1202081&view=revLog:
update the form renderer. when a content url starts with http, do not prefix the url with the website url
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=1202081&r1=1202080&r2=1202081&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Tue Nov 15 07:41:50 2011
@@ -2637,10 +2637,12 @@ public class MacroFormRenderer implement
alternate = description;
}
if (UtilValidate.isNotEmpty(value)) {
- StringBuilder buffer = new StringBuilder();
- ContentUrlTag.appendContentPrefix(request, buffer);
- buffer.append(value);
- value = buffer.toString();
+ if (!value.startsWith("http")) {
+ StringBuilder buffer = new StringBuilder();
+ ContentUrlTag.appendContentPrefix(request, buffer);
+ buffer.append(value);
+ value = buffer.toString();
+ }
} else if (value == null) {
value = "";
}