Author: chris.laprun(a)jboss.com
Date: 2010-01-08 10:21:58 -0500 (Fri, 08 Jan 2010)
New Revision: 1204
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWSRPFormInputSet.java
Log:
- Fixed rendering method: cannot use a buffer to build the output markup first as calling
renderUIComponent will not use it.
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWSRPFormInputSet.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWSRPFormInputSet.java 2010-01-08
10:42:14 UTC (rev 1203)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWSRPFormInputSet.java 2010-01-08
15:21:58 UTC (rev 1204)
@@ -25,7 +25,6 @@
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.form.UIForm;
-import org.exoplatform.webui.form.UIFormInputBase;
import org.exoplatform.webui.form.UIFormInputSet;
import java.io.Writer;
@@ -52,8 +51,8 @@
return;
}
- StringBuilder sb = new StringBuilder(512);
- sb.append("<div class=\"UIFormInputSet\">");
+ Writer w = context.getWriter();
+ w.write("<div class=\"UIFormInputSet\">");
ResourceBundle res = context.getApplicationResourceBundle();
UIForm uiForm = getAncestorOfType(UIForm.class);
@@ -61,33 +60,25 @@
{
if (inputEntry.isRendered())
{
- sb.append("<div class=\"row\">");
+ w.write("<div class=\"row\">");
String label;
try
{
label = uiForm.getLabel(res, inputEntry.getId());
- if (inputEntry instanceof UIFormInputBase)
- {
- ((UIFormInputBase)inputEntry).setLabel(label);
- }
}
catch (MissingResourceException ex)
{
- //label = " " ;
label = inputEntry.getName();
System.err.println("\n " + uiForm.getId() + ".label."
+ inputEntry.getId() + " not found value");
}
-
sb.append("<label>").append(label).append("</label>");
+ w.write("<label>" + label + "</label>");
renderUIComponent(inputEntry);
- sb.append("</div>");
+ w.write("</div>");
}
}
- sb.append("</div>");
-
- Writer w = context.getWriter();
- w.write(sb.toString());
+ w.write("</div>");
}
}