Author: erwan
Date: Wed Mar 31 09:54:55 2010
New Revision: 929449
URL:
http://svn.apache.org/viewvc?rev=929449&view=revLog:
Correcting a NPE introduced at rev 929157 when using sub-hyperlink
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=929449&r1=929448&r2=929449&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 Wed Mar 31 09:54:55 2010
@@ -2874,8 +2874,12 @@ public class MacroFormRenderer implement
if (UtilValidate.isNotEmpty(request.getAttribute("image"))) {
imgSrc = request.getAttribute("image").toString();
}
- alt = request.getAttribute("alternate").toString();
- imgTitle = request.getAttribute("imageTitle").toString();
+ if (UtilValidate.isNotEmpty(request.getAttribute("alternate"))) {
+ alt = request.getAttribute("alternate").toString();
+ }
+ if (UtilValidate.isNotEmpty(request.getAttribute("imageTitle"))) {
+ imgTitle = request.getAttribute("imageTitle").toString();
+ }
if(UtilValidate.isEmpty(imgTitle)){
imgTitle = modelFormField.getTitle(context);
}