Author: jleroux
Date: Fri Mar 6 20:42:51 2009
New Revision: 751066
URL: http://svn.apache.org/viewvc?rev=751066&view=rev
Log:
A patch from Stephen Rufle "WidgetWorker outputting empty image tags."
(https://issues.apache.org/jira/browse/OFBIZ-2230) - OFBIZ-2230
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=751066&r1=751065&r2=751066&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
(original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Fri Mar
6 20:42:51 2009
@@ -79,7 +79,7 @@
}
public static void makeHyperlinkString(Appendable writer, String
linkStyle, String targetType, String target, String description,
HttpServletRequest request, HttpServletResponse response, Map<String, Object>
context, String targetWindow, String event, String action) throws IOException {
- if (UtilValidate.isNotEmpty(description) ||
UtilValidate.isNotEmpty(request.getAttribute("image"))) {
+ if (UtilValidate.isNotEmpty(description) ||
UtilValidate.isNotEmpty(request.getAttribute("image"))) {
writer.append("<a");
if (UtilValidate.isNotEmpty(linkStyle)) {
@@ -110,8 +110,8 @@
writer.append('>');
- if (request.getAttribute("image") != null) {
- writer.append("<img src =
\""+request.getAttribute("image").toString()+"\"/>");
+ if(UtilValidate.isNotEmpty(request.getAttribute("image"))){
+ writer.append("<img src =
\""+request.getAttribute("image").toString()+"\"/>");
}
writer.append(description);