Author: apatel
Date: Mon Jun 23 22:19:45 2008
New Revision: 671029
URL:
http://svn.apache.org/viewvc?rev=671029&view=revLog:
Now rendering Id attribute of span displaying data in form.
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=671029&r1=671028&r2=671029&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Mon Jun 23 22:19:45 2008
@@ -163,11 +163,18 @@
if (UtilValidate.isNotEmpty(modelFormField.getWidgetStyle()) || modelFormField.shouldBeRed(context)) {
str.append("<span class=\"");
str.append(modelFormField.getWidgetStyle());
+ str.append('"');
// add a style of red if this is a date/time field and redWhen is true
+ String idName = modelFormField.getIdName();
+ if (UtilValidate.isNotEmpty(idName)) {
+ str.append(" id=\"");
+ str.append(idName);
+ str.append('"');
+ }
if (modelFormField.shouldBeRed(context)) {
str.append(" alert");
}
- str.append("\">");
+ str.append('>');
}
if (str.length() > 0) {