*
* @exception JspException if a processing error occurs
*/
public int doEndTag() throws JspException {
JspWriter out = pageContext.getOut();
try {
// Render the beginning of this element
out.println();
out.print("<table ");
if (columns > 2) {
out.print(" columns=\"");
out.print(columns);
out.print("\"");
}
if (tableStyle != null) {
out.print(" class=\"");
out.print(tableStyle);
out.print("\"");
out.print(" border=\"1\" cellspacing=\"0\" ");
out.print(" cellpadding=\"0\" width=\"100%\" ");
}
out.println(">");
// Render each defined row
int n = labels.size();
for (int i = 0; i < n; i++) {
String label = (String) labels.get(i);
boolean header = ((Boolean) headers.get(i)).booleanValue();
String data = (String) datas.get(i);
String labelStyle = (String) labelStyles.get(i);
String dataStyle = (String) dataStyles.get(i);
String styleId = (String) styleIds.get(i);
if (header)
out.println("<tr class=\"header-row\" >");
else out.println("<tr>");
out.println(" <td width=\"27%\"> ");
out.print(" <div align=\"left\"");
if (labelStyle != null)
out.print( " class=\"" + labelStyle +"\"");
out.print(">");
if (styleId != null) {
out.print("<label for=\"" + styleId + "\">");
}
out.print(label);
if (styleId != null) {
out.print("</label>");
}
out.println(" </div>");
out.println(" </td>");
out.println(" <td width=\"73%\"> ");
out.print(" <div align=\"left\"" );
if (dataStyle != null)
out.print(" class=\"" + dataStyle + "\"");
out.print(">");
out.print(data);
out.println(" </div>");
out.print(" </td>");
out.println("</tr>");
/*
if (!header) {
out.println("<tr height=\"1\">");
out.println(" <td class=\""+ lineStyle + "\" colspan=\"2\">");
out.println(" <img src=\"\" alt=\"\" width=\"1\" height=\"1\" border=\"0\">");
out.println(" </td>");
out.println("</tr>");
}
*/
}
// Render the end of this element
out.println("</table>");
out.println();
} catch (IOException e) {
throw new JspException(e);
}