svn commit: r664355 - /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: r664355 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java

adrianc
Author: adrianc
Date: Sat Jun  7 08:33:24 2008
New Revision: 664355

URL: http://svn.apache.org/viewvc?rev=664355&view=rev
Log:
Fix for form widget renderer - it wasn't rendering the field-group id.

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=664355&r1=664354&r2=664355&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 Sat Jun  7 08:33:24 2008
@@ -2377,17 +2377,27 @@
     
     public void renderFieldGroupOpen(Appendable writer, Map<String, Object> context, ModelForm.FieldGroup fieldGroup) throws IOException {
         String style = fieldGroup.getStyle();
-        if (UtilValidate.isNotEmpty(style)) {
+        String id = fieldGroup.getId();
+        if (UtilValidate.isNotEmpty(style) || UtilValidate.isNotEmpty(id)) {
             writer.append("<div");
-            writer.append(" class=\"");
-            writer.append(style);
-            writer.append("\">");
+            if (UtilValidate.isNotEmpty(style)) {
+                writer.append(" class=\"");
+                writer.append(style);
+                writer.append("\"");
+            }
+            if (UtilValidate.isNotEmpty(id)) {
+                writer.append(" id=\"");
+                writer.append(id);
+                writer.append("\"");
+            }
+            writer.append(">");
         }
     }
     
     public void renderFieldGroupClose(Appendable writer, Map<String, Object> context, ModelForm.FieldGroup fieldGroup) throws IOException {
         String style = fieldGroup.getStyle();
-        if (UtilValidate.isNotEmpty(style)) {
+        String id = fieldGroup.getId();
+        if (UtilValidate.isNotEmpty(style) || UtilValidate.isNotEmpty(id)) {
             writer.append("</div>");
         }
     }