Author: phuong_vu
Date: 2011-02-25 04:28:53 -0500 (Fri, 25 Feb 2011)
New Revision: 5943
Modified:
portal/branches/branch-GTNPORTAL-1822/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java
Log:
GTNPORTAL-1782 Show Permission Setting is empty when add/edit category
Modified:
portal/branches/branch-GTNPORTAL-1822/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1822/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java 2011-02-25
09:10:38 UTC (rev 5942)
+++
portal/branches/branch-GTNPORTAL-1822/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java 2011-02-25
09:28:53 UTC (rev 5943)
@@ -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);
+ hasLabel = true;
}
- w.write("</td>");
- w.write("<td class=\"FieldComponent\">");
- renderUIComponent(formInputBase);
- w.write("</td>");
- w.write("</tr>");
}
+ 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>");
Show replies by date