[gatein-commits] gatein SVN: r6294 - epp/portal/branches/EPP_5_1_0_GA_JBEPP-860/webui/core/src/main/java/org/exoplatform/webui/form.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Apr 19 15:45:16 EDT 2011


Author: ghjboss
Date: 2011-04-19 15:45:15 -0400 (Tue, 19 Apr 2011)
New Revision: 6294

Modified:
   epp/portal/branches/EPP_5_1_0_GA_JBEPP-860/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java
Log:
applied patch for GTNPORTAL-1782

Modified: epp/portal/branches/EPP_5_1_0_GA_JBEPP-860/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java
===================================================================
--- epp/portal/branches/EPP_5_1_0_GA_JBEPP-860/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java	2011-04-19 17:26:18 UTC (rev 6293)
+++ epp/portal/branches/EPP_5_1_0_GA_JBEPP-860/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java	2011-04-19 19:45:15 UTC (rev 6294)
@@ -167,12 +167,13 @@
       UIForm uiForm = getAncestorOfType(UIForm.class);
       for (UIComponent inputEntry : getChildren())
       {
-    	  if (inputEntry instanceof UIFormInputBase)
+    	  if (inputEntry.isRendered())
           {
-             if (inputEntry.isRendered())
+    		 String label = "";
+    		 boolean hasLabel = false;
+             if (inputEntry instanceof UIFormInputBase)
              {
                 UIFormInputBase formInputBase = (UIFormInputBase) inputEntry;
-                String label;
                 if (formInputBase.getLabel() != null)
                 {
                    label = uiForm.getLabel(res, formInputBase.getLabel());
@@ -181,20 +182,24 @@
                 {
                    label = uiForm.getLabel(res, formInputBase.getId());
                 }
-                w.write("<tr>");
-                w.write("<td class=\"FieldLabel\">");
-
-                // if missing resource and the label hasn't been set before, don't print out the label.
                 if (formInputBase.getLabel() != null || (label != formInputBase.getId()))
                 {
-                   w.write(label);
-                }
-                w.write("</td>");
-                w.write("<td class=\"FieldComponent\">");
-                renderUIComponent(formInputBase);
-                w.write("</td>");
-                w.write("</tr>");
+                	hasLabel = true;
+                }               
              }
+             w.write("<tr>");
+             w.write("<td class=\"FieldLabel\">");
+             // if missing resource and the label hasn't been set before, don't print out the label.
+             if (hasLabel)
+             {
+            	 w.write(label);
+             }
+             w.write("</td>");
+             w.write("<td class=\"FieldComponent\">");
+             renderUIComponent(inputEntry);
+             w.write("</td>");
+             w.write("</tr>");
+
           }
        }
       w.write("</table>");



More information about the gatein-commits mailing list