svn commit: r671029 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r671029 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java

apatel-2
Author: apatel
Date: Mon Jun 23 22:19:45 2008
New Revision: 671029

URL: http://svn.apache.org/viewvc?rev=671029&view=rev
Log:
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) {